diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index cf71465..af2b0c9 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -41,8 +41,10 @@ jobs: # The instrumented and PGO builds below use target-cpu=native, and # without --target cargo applies RUSTFLAGS to proc macros too. A cached # proc-macro .so compiled on a runner with a wider instruction set makes - # rustc die with SIGILL when it loads it, so the cache is keyed on the - # CPU model as well. + # rustc die with SIGILL when it loads it, so the CPU model is part of the + # cache key. It has to go in `shared-key`, not `key`: rust-cache appends + # `key` only when `shared-key` is unset, so setting both silently drops + # `key` from the cache key. - name: Read runner CPU model id: cpu run: echo "model=$(lscpu | sed -n 's/^Model name:[[:space:]]*//p' | tr -c 'A-Za-z0-9\n' '-')" >> "$GITHUB_OUTPUT" @@ -51,8 +53,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: prefix-key: v1-bench - shared-key: x86_64-unknown-linux-gnu - key: ${{ steps.cpu.outputs.model }} + shared-key: x86_64-unknown-linux-gnu-${{ steps.cpu.outputs.model }} - name: Install dependencies run: mix deps.get