From 8850188f58d5bea8f928fc9484b005c8f44cd114 Mon Sep 17 00:00:00 2001 From: Clement Tsang <34804052+ClementTsang@users.noreply.github.com> Date: Thu, 27 Aug 2026 05:48:48 -0400 Subject: [PATCH] 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. --- scripts/ci/bsd_tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ci/bsd_tests.sh b/scripts/ci/bsd_tests.sh index a2875105..eb726e72 100644 --- a/scripts/ci/bsd_tests.sh +++ b/scripts/ci/bsd_tests.sh @@ -5,6 +5,8 @@ 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." @@ -14,14 +16,14 @@ 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 + 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 stable -y + sh rustup.sh --default-toolchain "$RUST_VERSION" -y . "$HOME/.cargo/env" # TODO: Support default features eventually?