File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -206,11 +206,10 @@ jobs:
206206 Write-Host "github.ref='${{ github.ref }}'" -ForegroundColor Cyan
207207
208208 - name : Save vcpkg binary cache
209- # Save if cache was not hit (cache-hit != 'true' handles both 'false' and empty string cases)
210- # Note: All 6 parallel jobs may attempt to save the same cache key simultaneously.
211- # This is expected - GitHub Actions ensures only one succeeds, others show harmless warnings.
212- # See: https://github.com/actions/cache/blob/main/save/README.md
213- if : ${{ always() && startsWith(inputs.preset, 'win32') && steps.vcpkg_cache.outputs.cache-hit != 'true' }}
209+ # Only save if cache was not hit AND this is the designated job to save (prevents all 6 jobs from racing)
210+ # We use Generals + win32-vcpkg-debug as the "designated saver" since it's deterministic and always runs
211+ # All other jobs will benefit from the cache once it's saved by this job
212+ if : ${{ always() && startsWith(inputs.preset, 'win32') && steps.vcpkg_cache.outputs.cache-hit != 'true' && inputs.game == 'Generals' && inputs.preset == 'win32-vcpkg-debug' }}
214213 uses : actions/cache/save@v4
215214 with :
216215 path : ${{ github.workspace }}\vcpkg-bincache
You can’t perform that action at this time.
0 commit comments