Cache the cargo-llvm-cov binary in the coverage job

Skips the compile on cache hits; version is pinned so the cache key
matches what gets installed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Austin Schaefer 2026-09-20 11:20:31 +02:00
parent 9955610e09
commit c2868100f6

View file

@ -102,12 +102,19 @@ jobs:
sccache-${{ runner.os }}-
# Not baked into the rust-ci image (see docker/rust-ci in
# infrastructure) — install fresh each run rather than bumping the
# shared image just for this one project.
# infrastructure) — cache the compiled binary rather than bumping
# the shared image just for this one project. To upgrade, change the
# version here, in the cache key, and in the install command below.
- name: Cache cargo-llvm-cov binary
uses: actions/cache@v4
with:
path: ~/.cargo/bin/cargo-llvm-cov
key: cargo-llvm-cov-${{ runner.os }}-0.9.1
- name: Install cargo-llvm-cov
run: |
rustup component add llvm-tools-preview
command -v cargo-llvm-cov >/dev/null 2>&1 || cargo install cargo-llvm-cov --locked
command -v cargo-llvm-cov >/dev/null 2>&1 || cargo install cargo-llvm-cov --locked --version 0.9.1
# Reports coverage only — no --fail-under-lines yet. main.rs is
# excluded: thin argv dispatch exercised by the real end-to-end