Skip to content

Commit

Permalink
Change vcpkg cache key from runner.OS to matrix.os
Browse files Browse the repository at this point in the history
I'm not sure if vcpkg's binaries contain information about the compiler / platform version they've been built with, and I think it may mess up things if we mix the cached dependencies like this. The builds of the older OS'es also outputted an error at the end that they couldn't access the cache as it is already being accessed.

This will separate the caches, which should be a good thing to do in any case.
patrikhuber authored Apr 9, 2023
1 parent 46d9fac commit 31c9e6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -40,9 +40,9 @@ jobs:
uses: actions/cache@v3
with:
path: ${{env.cache_path}}
key: ${{runner.OS}}-vcpkg-cache-${{ hashFiles('vcpkg.json', '.github/workflows/cmake.yml') }}
key: ${{matrix.os}}-vcpkg-cache-${{ hashFiles('vcpkg.json', '.github/workflows/cmake.yml') }}
restore-keys: |
${{runner.OS}}-vcpkg-cache-
${{matrix.os}}-vcpkg-cache-
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.

0 comments on commit 31c9e6f

Please sign in to comment.