Files
bottom/scripts/ci/bsd_tests.sh
Clement Tsang a54dcbb093 ci: fix *BSD tests (#1993)
* ci: fix CI tests for FreeBSD

* add netbsd

* netbsd skips data collection for now

* comments

* wrong script
2026-02-28 14:45:42 -05:00

33 lines
1003 B
Bash

#!/bin/sh
# Script to be run by the `ci.yml` workflow for -BSD jobs based on the target.
set -eu
BSD_TARGET="${1:-}"
if [ -z "$BSD_TARGET" ]; then
echo "Error: BSD target must be specified."
exit 1
fi
if [ "$BSD_TARGET" = "x86_64-unknown-freebsd" ]; then
pkg install -y curl bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
sh rustup.sh --default-toolchain stable -y
. "$HOME/.cargo/env"
cargo test --no-fail-fast --locked -- --nocapture --quiet
elif [ "$BSD_TARGET" = "x86_64-unknown-netbsd" ]; then
/usr/sbin/pkg_add -u curl bash mozilla-rootcerts-openssl
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
sh rustup.sh --default-toolchain stable -y
. "$HOME/.cargo/env"
# TODO: Support default features eventually?
cargo test --no-fail-fast --locked --no-default-features -- --nocapture --quiet --skip test_data_collection
else
echo "Unsupported BSD target type."
exit 1
fi