Skip to content

Commit d93f9ae

Browse files
committed
Auto merge of rust-lang#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.
2 parents 9713294 + 505e4dd commit d93f9ae

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/tools/miri/.github/workflows/ci.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ jobs:
5757
~/.cargo/bin
5858
~/.cargo/.crates.toml
5959
~/.cargo/.crates2.json
60-
key: cargo-${{ runner.os }}-reset20240331-${{ hashFiles('**/Cargo.lock') }}
61-
restore-keys: cargo-${{ runner.os }}-reset20240331
60+
key: cargo-${{ runner.os }}-reset20240425-${{ hashFiles('**/Cargo.lock') }}
61+
restore-keys: cargo-${{ runner.os }}-reset20240425
6262

63-
- name: Install rustup-toolchain-install-master
63+
- name: Install tools
6464
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
65-
run: cargo install -f rustup-toolchain-install-master
65+
run: cargo install -f rustup-toolchain-install-master hyperfine
6666

6767
- name: Install miri toolchain
6868
run: |

src/tools/miri/ci/ci.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ function run_tests {
7878
done
7979
fi
8080
if [ -n "${TEST_BENCH-}" ]; then
81-
# Check that the benchmarks build and run, but without actually benchmarking.
82-
time HYPERFINE="'$BASH' -c" ./miri bench
81+
# Check that the benchmarks build and run, but only once.
82+
time HYPERFINE="hyperfine -w0 -r1" ./miri bench
8383
fi
8484

8585
## test-cargo-miri

0 commit comments

Comments
 (0)