Files
bottom/scripts/ci/bsd_tests.sh
T
Clement Tsang 8850188f58 ci: fix bsd test script not respecting pinned Rust version (#2221)
I had made it so it only used stable, which was generally right but not always (e.g. I downgrade Rust version like right now).

Note this had no effect on actually building the binaries as those use cross.
2026-08-27 09:48:48 +00:00

35 lines
1.1 KiB
Bash

#!/bin/sh
# Script to be run by the `ci.yml` workflow for -BSD jobs based on the target.
set -eu
BSD_TARGET="${1:-}"
SCRIPT_DIR=$(cd -- "$(dirname -- "$0")" > /dev/null && pwd)
RUST_VERSION=$(cat "$SCRIPT_DIR/.github/ci/rust_version.txt")
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 "$RUST_VERSION" -y
. "$HOME/.cargo/env"
cargo test --no-fail-fast --locked --features generate_schema -- --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 "$RUST_VERSION" -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