Merge bitcoin/bitcoin#34682: ci: fix vcpkg tools cache key collision between windows matrix jobs

17a079c2fb96c44f25d6392389db22a7f424f8f1 ci: fix vcpkg tools cache key collision between windows matrix jobs (will)

Pull request description:

  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.

ACKs for top commit:
  maflcko:
    lgtm ACK 17a079c2fb96c44f25d6392389db22a7f424f8f1
  hebasto:
    ACK 17a079c2fb96c44f25d6392389db22a7f424f8f1, this should fix issues like https://github.com/bitcoin/bitcoin/pull/34559#issuecomment-3897330307.

Tree-SHA512: 2e83846bfc88947b4bc321baa23563e0c093cd4f55f11f8105c2ecf867b78028aa71aa4780f928103b7a9f1f2e3cf72dbb072f05e7925bc1d00069234acf23c9
This commit is contained in:
Hennadii Stepanov 2026-02-26 15:59:15 +00:00
commit 107a204d24
No known key found for this signature in database
GPG Key ID: 410108112E7EA81F

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 }}