Skip to content

Commit 04744a2

Browse files
committed
fix CI benchmark checks
1 parent 08e7d94 commit 04744a2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ci.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ function run_tests {
5454
unset RUSTC MIRI
5555
rm -rf .cargo
5656

57-
# Ensure that our benchmarks all work, on the host at least.
58-
if [ -z "${MIRI_TEST_TARGET+exists}" ]; then
57+
# Ensure that our benchmarks all work, but only on Linux hosts.
58+
if [ -z "${MIRI_TEST_TARGET+exists}" ] && [ "$HOST_TARGET" = x86_64-unknown-linux-gnu ] ; then
5959
for BENCH in $(ls "bench-cargo-miri"); do
6060
cargo miri run --manifest-path bench-cargo-miri/$BENCH/Cargo.toml
6161
done

miri

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ bench)
9090
# Make sure we have an up-to-date Miri installed
9191
"$0" install
9292
# Run the requested benchmarks
93-
if [ -z "$@" ]; then
93+
if [ -z "${1+exists}" ]; then
9494
BENCHES=( $(ls "$MIRIDIR/bench-cargo-miri" ) )
9595
else
9696
BENCHES=("$@")
9797
fi
9898
for BENCH in "${BENCHES[@]}"; do
99-
hyperfine -w 1 -m 5 --shell=none "cargo +$TOOLCHAIN miri run --manifest-path bench-cargo-miri/$BENCH/Cargo.toml"
99+
hyperfine -w 1 -m 5 --shell=none "cargo +$TOOLCHAIN miri run --manifest-path $MIRIDIR/bench-cargo-miri/$BENCH/Cargo.toml"
100100
done
101101
exit 0
102102
;;

0 commit comments

Comments
 (0)