fix CI benchmark checks

This commit is contained in:
Ralf Jung 2022-08-06 22:45:25 -04:00
parent 08e7d94562
commit 04744a2935
2 changed files with 4 additions and 4 deletions

4
ci.sh
View File

@ -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
View File

@ -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
;;