Skip to content

Commit 8e8a831

Browse files
authored
Fix vcpkg cache paths for Linux and macOS (#43)
- Fix Linux/macOS cache path from build/Release/vcpkg_installed to build/vcpkg_installed to match VCPKG_INSTALLED_DIR in CMakePresets.json - Add missing vcpkg cache steps to pull-request.yml for all platforms - Bump cache key version to v3 to invalidate stale entries
1 parent 840a686 commit 8e8a831

2 files changed

Lines changed: 44 additions & 8 deletions

File tree

.github/workflows/main.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ jobs:
5353
vcpkg/downloads
5454
vcpkg/buildtrees
5555
vcpkg/packages
56-
build/Release/vcpkg_installed
57-
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
56+
build/vcpkg_installed
57+
key: ${{ runner.os }}-vcpkg-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
5858
restore-keys: |
59-
${{ runner.os }}-vcpkg-
59+
${{ runner.os }}-vcpkg-v3-
6060
6161
- name: Install system dependencies
6262
run: |
@@ -158,9 +158,9 @@ jobs:
158158
vcpkg/buildtrees
159159
vcpkg/packages
160160
build/vcpkg_installed
161-
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
161+
key: ${{ runner.os }}-vcpkg-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
162162
restore-keys: |
163-
${{ runner.os }}-vcpkg-
163+
${{ runner.os }}-vcpkg-v3-
164164
165165
- name: Install Firebird
166166
shell: cmd
@@ -247,10 +247,10 @@ jobs:
247247
vcpkg/downloads
248248
vcpkg/buildtrees
249249
vcpkg/packages
250-
build/Release/vcpkg_installed
251-
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
250+
build/vcpkg_installed
251+
key: ${{ runner.os }}-vcpkg-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
252252
restore-keys: |
253-
${{ runner.os }}-vcpkg-
253+
${{ runner.os }}-vcpkg-v3-
254254
255255
- name: Install system dependencies
256256
run: |

.github/workflows/pull-request.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ jobs:
4242
submodules: recursive
4343
fetch-depth: 0
4444

45+
- name: Cache vcpkg artifacts
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
vcpkg/downloads
50+
vcpkg/buildtrees
51+
vcpkg/packages
52+
build/vcpkg_installed
53+
key: ${{ runner.os }}-vcpkg-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
54+
restore-keys: |
55+
${{ runner.os }}-vcpkg-v3-
56+
4557
- name: Install system dependencies
4658
run: |
4759
sudo apt-get update
@@ -129,6 +141,18 @@ jobs:
129141
submodules: recursive
130142
fetch-depth: 0
131143

144+
- name: Cache vcpkg artifacts
145+
uses: actions/cache@v4
146+
with:
147+
path: |
148+
vcpkg/downloads
149+
vcpkg/buildtrees
150+
vcpkg/packages
151+
build/vcpkg_installed
152+
key: ${{ runner.os }}-vcpkg-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
153+
restore-keys: |
154+
${{ runner.os }}-vcpkg-v3-
155+
132156
- name: Install Firebird
133157
shell: cmd
134158
run: |
@@ -209,6 +233,18 @@ jobs:
209233
submodules: recursive
210234
fetch-depth: 0
211235

236+
- name: Cache vcpkg artifacts
237+
uses: actions/cache@v4
238+
with:
239+
path: |
240+
vcpkg/downloads
241+
vcpkg/buildtrees
242+
vcpkg/packages
243+
build/vcpkg_installed
244+
key: ${{ runner.os }}-vcpkg-v3-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json') }}
245+
restore-keys: |
246+
${{ runner.os }}-vcpkg-v3-
247+
212248
- name: Install system dependencies
213249
run: |
214250
brew install \

0 commit comments

Comments
 (0)