From c2868100f6ae24009d0a93c2e483266076fff895 Mon Sep 17 00:00:00 2001 From: Austin Schaefer Date: Sun, 20 Sep 2026 11:20:31 +0200 Subject: [PATCH] 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 --- .forgejo/workflows/ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index 499c98d..39a5fd6 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -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