fix CI benchmark checks
This commit is contained in:
parent
08e7d94562
commit
04744a2935
4
ci.sh
4
ci.sh
@ -54,8 +54,8 @@ function run_tests {
|
||||
unset RUSTC MIRI
|
||||
rm -rf .cargo
|
||||
|
||||
# Ensure that our benchmarks all work, on the host at least.
|
||||
if [ -z "${MIRI_TEST_TARGET+exists}" ]; then
|
||||
# Ensure that our benchmarks all work, but only on Linux hosts.
|
||||
if [ -z "${MIRI_TEST_TARGET+exists}" ] && [ "$HOST_TARGET" = x86_64-unknown-linux-gnu ] ; then
|
||||
for BENCH in $(ls "bench-cargo-miri"); do
|
||||
cargo miri run --manifest-path bench-cargo-miri/$BENCH/Cargo.toml
|
||||
done
|
||||
|
4
miri
4
miri
@ -90,13 +90,13 @@ bench)
|
||||
# Make sure we have an up-to-date Miri installed
|
||||
"$0" install
|
||||
# Run the requested benchmarks
|
||||
if [ -z "$@" ]; then
|
||||
if [ -z "${1+exists}" ]; then
|
||||
BENCHES=( $(ls "$MIRIDIR/bench-cargo-miri" ) )
|
||||
else
|
||||
BENCHES=("$@")
|
||||
fi
|
||||
for BENCH in "${BENCHES[@]}"; do
|
||||
hyperfine -w 1 -m 5 --shell=none "cargo +$TOOLCHAIN miri run --manifest-path bench-cargo-miri/$BENCH/Cargo.toml"
|
||||
hyperfine -w 1 -m 5 --shell=none "cargo +$TOOLCHAIN miri run --manifest-path $MIRIDIR/bench-cargo-miri/$BENCH/Cargo.toml"
|
||||
done
|
||||
exit 0
|
||||
;;
|
||||
|
Loading…
x
Reference in New Issue
Block a user