From 4b8eb82734d450fd16afc0a5edb3725eca94a08d Mon Sep 17 00:00:00 2001 From: Daniel Keller Date: Mon, 17 Aug 2026 13:22:56 +0200 Subject: [PATCH] ci: Give each matrix leg its own ccache key github.job is the job id, so all six simulation legs and all eight elaboration legs keyed their cache identically. They then raced to save it: one won and the rest reported "Unable to reserve cache with key ccache-simulate-", so five of six suites stored nothing and would restore another suite's objects. The key comes from the matrix value now, passed into the composite action, which cannot see the matrix itself. --- .github/actions/verify-setup/action.yml | 10 +++++++--- .github/workflows/verify.yml | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/actions/verify-setup/action.yml b/.github/actions/verify-setup/action.yml index 4dae72d2..e26d9b5e 100644 --- a/.github/actions/verify-setup/action.yml +++ b/.github/actions/verify-setup/action.yml @@ -14,6 +14,11 @@ inputs: bender-version: description: Bender release to install default: '0.32.1' + ccache-key: + description: > + Distinguishes this job's ccache from its siblings. Matrix legs share a job + id, so a shared key makes them race and all but one fail to save. + default: shared runs: using: composite steps: @@ -55,10 +60,9 @@ runs: uses: actions/cache@v4 with: path: ~/.cache/ccache - key: ccache-${{ github.job }}-${{ github.sha }} + key: ccache-${{ inputs.ccache-key }}-${{ github.sha }} restore-keys: | - ccache-${{ github.job }}- - ccache- + ccache-${{ inputs.ccache-key }}- - if: inputs.verilator == 'true' shell: bash diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 7f905c6f..a2b7b885 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -53,6 +53,7 @@ jobs: uses: ./.github/actions/verify-setup with: verilator: 'true' + ccache-key: elab-${{ matrix.id }} - name: Generate RTL run: uv run --locked make idma_hw_all @@ -149,6 +150,7 @@ jobs: uses: ./.github/actions/verify-setup with: verilator: 'true' + ccache-key: sim-${{ matrix.suite }} - name: Generate RTL run: uv run --locked make idma_hw_all