Auto merge of #3514 - RalfJung:hyperfine, r=RalfJung

CI: run benches with hyperfine rather than bash

The hyperfine installation is cached so this should not cost a lot of CI time.

This is step 1/2 to getting rid of the BASH variable hack.
This commit is contained in:
bors 2024-04-25 09:16:32 +00:00
commit d93f9ae3ee
2 changed files with 6 additions and 6 deletions

View File

@ -57,12 +57,12 @@ jobs:
~/.cargo/bin
~/.cargo/.crates.toml
~/.cargo/.crates2.json
key: cargo-${{ runner.os }}-reset20240331-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-reset20240331
key: cargo-${{ runner.os }}-reset20240425-${{ hashFiles('**/Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-reset20240425
- name: Install rustup-toolchain-install-master
- name: Install tools
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
run: cargo install -f rustup-toolchain-install-master
run: cargo install -f rustup-toolchain-install-master hyperfine
- name: Install miri toolchain
run: |

View File

@ -78,8 +78,8 @@ function run_tests {
done
fi
if [ -n "${TEST_BENCH-}" ]; then
# Check that the benchmarks build and run, but without actually benchmarking.
time HYPERFINE="'$BASH' -c" ./miri bench
# Check that the benchmarks build and run, but only once.
time HYPERFINE="hyperfine -w0 -r1" ./miri bench
fi
## test-cargo-miri