mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-09-18 08:35:35 +00:00
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.
This commit is contained in:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user