Skip to content

Commit d96c2e3

Browse files
committed
ci: fixed vcpkg binary assets cache updating
1 parent 64d2a04 commit d96c2e3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ jobs:
9999
!${{ env.VCPKG_ROOT }}/downloads
100100
!${{ env.VCPKG_ROOT }}/installed
101101
# The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
102-
key: |
103-
vcpkg-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-${{ runner.os }}
102+
key: vcpkg-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-${{ runner.os }}-${{ github.run_id }}
103+
restore-keys: vcpkg-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-${{ runner.os }}
104104

105105
- name: Configure CMake
106106
working-directory: ${{ github.workspace }}/build

.github/workflows/nightly-builds.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ jobs:
6161
core.exportVariable('VCPKG_ROOT', `${process.env.GITHUB_WORKSPACE}/external/vcpkg`.replaceAll('\\', '/'));
6262
core.exportVariable('VCPKG_DEFAULT_BINARY_CACHE', `${process.env.GITHUB_WORKSPACE}/external/vcpkg/bincache`.replaceAll('\\', '/'));
6363
64+
- name: Obtain current job information
65+
uses: qoomon/actions--context@v4
66+
6467
- name: Install dependencies (Linux)
6568
if: runner.os == 'Linux'
6669
run: |
@@ -90,8 +93,8 @@ jobs:
9093
!${{ env.VCPKG_ROOT }}/downloads
9194
!${{ env.VCPKG_ROOT }}/installed
9295
# The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
93-
key: |
94-
vcpkg-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-${{ runner.os }}
96+
key: vcpkg-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-${{ runner.os }}-${{ env.GITHUB_JOB_ID }}
97+
restore-keys: vcpkg-${{ hashFiles('.git/modules/external/vcpkg/HEAD') }}-${{ runner.os }}
9598

9699
- name: Configure CMake
97100
working-directory: ${{ github.workspace }}/build

0 commit comments

Comments
 (0)