mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-05-03 13:30:44 +00:00
a54dcbb093
* ci: fix CI tests for FreeBSD * add netbsd * netbsd skips data collection for now * comments * wrong script
33 lines
1003 B
Bash
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
|