about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-04-25 08:13:34 +0200
committerRalf Jung <post@ralfj.de>2024-04-25 11:14:22 +0200
commit505e4dd7ba9f32305ab42b3cd46d122bd7fb4b6f (patch)
treed297feb494e9a407d69c6020f781344c5689ce2b
parent246ba3b808af7d0b6e515486fd734d04078e4d73 (diff)
downloadrust-505e4dd7ba9f32305ab42b3cd46d122bd7fb4b6f.tar.gz
rust-505e4dd7ba9f32305ab42b3cd46d122bd7fb4b6f.zip
CI: run benches with hyperfine rather than bash
-rw-r--r--src/tools/miri/.github/workflows/ci.yml8
-rwxr-xr-xsrc/tools/miri/ci/ci.sh4
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