Skip to content

Commit 4ced7c2

Browse files
committed
ci(vcpkg): Add comment explaining expected cache save race condition
1 parent 819e717 commit 4ced7c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ jobs:
206206
Write-Host "github.ref='${{ github.ref }}'" -ForegroundColor Cyan
207207
208208
- name: Save vcpkg binary cache
209-
# TODO: Add back && github.ref == 'refs/heads/main' after testing to prevent PR cache races
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
210213
if: ${{ always() && startsWith(inputs.preset, 'win32') && steps.vcpkg_cache.outputs.cache-hit != 'true' }}
211214
uses: actions/cache/save@v4
212215
with:

0 commit comments

Comments
 (0)