Skip to content

Commit 7a5d365

Browse files
claudespoorcc
authored andcommitted
fix: use rolling cache key for clcache on Windows to get cache hits
The static key caused clcache to restore a stale entry after every MSVC runner update, resulting in 0 hits / 701 misses on every build run. A sha-based key with a prefix restore-keys fallback and save-always mirrors the rolling strategy used by ccache-action on Linux/macOS. https://claude.ai/code/session_01XTvMZtPH8WpuiRBZkqWiHk
1 parent 9d54759 commit 7a5d365

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ jobs:
7676
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
7777
with:
7878
path: ${{ github.workspace }}\.clcache
79-
key: ${{ github.job }}-${{ matrix.platform }}
79+
key: ${{ github.job }}-${{ matrix.platform }}-${{ github.sha }}
80+
restore-keys: |
81+
${{ github.job }}-${{ matrix.platform }}-
82+
save-always: true
8083

8184
- name: Create sbom, binary & package
8285
env:

0 commit comments

Comments
 (0)