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