From 505e4dd7ba9f32305ab42b3cd46d122bd7fb4b6f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Thu, 25 Apr 2024 08:13:34 +0200 Subject: [PATCH] CI: run benches with hyperfine rather than bash --- src/tools/miri/.github/workflows/ci.yml | 8 ++++---- src/tools/miri/ci/ci.sh | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/miri/.github/workflows/ci.yml b/src/tools/miri/.github/workflows/ci.yml index 73afd2a12a9..69442295b4f 100644 --- a/src/tools/miri/.github/workflows/ci.yml +++ b/src/tools/miri/.github/workflows/ci.yml @@ -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: | diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index f8ba612750e..eb32f325a15 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -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