ci: fix vcpkg tools cache key collision between windows matrix jobs

The standard and fuzz matrix jobs share the same github.job value
(windows-native-dll), so both try to save the vcpkg tools cache with the
same key.

Since the tools are identical across build types, let them share a
single cache entry by restricting the save to the standard job only.
This commit is contained in:
will 2026-02-26 14:52:35 +00:00
parent af99643454
commit 17a079c2fb
No known key found for this signature in database
GPG Key ID: CE6EC49945C17EA6

View File

@ -296,7 +296,8 @@ jobs:
- name: Save vcpkg tools cache
uses: actions/cache/save@v5
if: github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch && steps.vcpkg-tools-cache.outputs.cache-hit != 'true'
# Only save cache from one job as they share tools. If the matrix is expanded to jobs with unique tools, this may need amending.
if: github.event_name != 'pull_request' && github.ref_name == github.event.repository.default_branch && steps.vcpkg-tools-cache.outputs.cache-hit != 'true' && matrix.job-type == 'standard'
with:
path: C:/vcpkg/downloads/tools
key: ${{ github.job }}-vcpkg-tools-${{ github.run_id }}