CI: Change vcpkg cache key to depend on vcpkg.json

The vcpkg cache should rarely change - only when new dependencies are
added or a version changes. Both of these events involve modifying the
vcpkg.json file. So instead of uploading duplicated vcpkg caches in each
workflow, let's only upload changed caches.
This commit is contained in:
Timothy Flynn 2026-04-09 10:56:51 -04:00 committed by Tim Flynn
parent 9524d92a9f
commit f79401bf9c

View file

@ -84,6 +84,6 @@ runs:
id: 'vcpkg'
with:
path: ${{ inputs.vcpkg_cache_path }}
key: vcpkg | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }} | ${{ steps.date-stamp.outputs.timestamp }}
key: vcpkg | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }} | ${{ hashFiles('vcpkg.json') }}
restore-keys: |
vcpkg | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }}