Skip to content

Commit 62649b5

Browse files
author
codethinki
committed
save and restore order was broken
1 parent f870e58 commit 62649b5

1 file changed

Lines changed: 17 additions & 20 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
# Vcpkg cache
4949
- name: Restore vcpkg cache
50-
id: restore-vcpkg
50+
id: restore-vcpkg-linux
5151
uses: actions/cache/restore@v4
5252
with:
5353
path: vcpkg_installed
@@ -63,14 +63,14 @@ jobs:
6363
cmake --preset ci_${{ matrix.compiler }}_af_cpu
6464
6565
- name: Save vcpkg cache
66-
if: steps.restore-vcpkg.cache-hit != 'true'
66+
if: steps.restore-vcpkg-linux.cache-hit != 'true'
6767
uses: actions/cache/save@v4
6868
with:
6969
path: vcpkg_installed
70-
key: ${{ steps.restore-vcpkg.outputs.cache-primary-key }}
70+
key: ${{ steps.restore-vcpkg-linux.outputs.cache-primary-key }}
7171

7272
- name: Restore BuildCache cache
73-
id: restore-buildcache
73+
id: restore-buildcache-linux
7474
uses: actions/cache/restore@v4
7575
with:
7676
path: .buildcache
@@ -87,7 +87,7 @@ jobs:
8787
uses: actions/cache/save@v4
8888
with:
8989
path: .buildcache
90-
key: ${{ steps.restore-buildcache.outputs.cache-primary-key }}
90+
key: ${{ steps.restore-buildcache-linux.outputs.cache-primary-key }}
9191

9292
- name: Test
9393
uses: ./.github/actions/run-linux
@@ -139,25 +139,28 @@ jobs:
139139
with:
140140
compiler: ${{ matrix.compiler }}
141141

142-
# Vcpkg cache
143142
- name: Restore vcpkg cache
144143
id: restore-vcpkg-win
145144
uses: actions/cache/restore@v4
146145
with:
147146
path: vcpkg_installed
148-
key: vcpkg-installed-windows-${{ matrix.compiler }}-${{ hashFiles('vcpkg-configuration.json') }}
147+
key: vcpkg-installed-windows-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }}
149148
restore-keys: |
150-
vcpkg-installed-windows-${{ matrix.compiler }}-${{ hashFiles('vcpkg.json') }}
151149
vcpkg-installed-windows-${{ matrix.compiler }}-
152150
151+
- name: Configure
152+
shell: pwsh
153+
run: |
154+
Copy-Item ci/CMakeUserPresets.json CMakeUserPresets.json
155+
cmake --preset ci_msvc_af_cpu
156+
153157
- name: Save vcpkg cache
154158
if: steps.restore-vcpkg-win.cache-hit != 'true'
155159
uses: actions/cache/save@v4
156160
with:
157161
path: vcpkg_installed
158162
key: ${{ steps.restore-vcpkg-win.outputs.cache-primary-key }}
159163

160-
# BuildCache cache
161164
- name: Restore BuildCache cache
162165
id: restore-buildcache-win
163166
uses: actions/cache/restore@v4
@@ -167,23 +170,17 @@ jobs:
167170
restore-keys: |
168171
buildcache-windows-${{ matrix.compiler }}-
169172
173+
- name: Build
174+
shell: pwsh
175+
run: |
176+
cmake --build --preset win_msvc_af_cpu_ci_build_test
177+
170178
- name: Save BuildCache cache
171179
uses: actions/cache/save@v4
172180
with:
173181
path: .buildcache
174182
key: ${{ steps.restore-buildcache-win.outputs.cache-primary-key }}
175183

176-
- name: Configure
177-
shell: pwsh
178-
run: |
179-
Copy-Item ci/CMakeUserPresets.json CMakeUserPresets.json
180-
cmake --preset ci_msvc_af_cpu
181-
182-
- name: Build
183-
shell: pwsh
184-
run: |
185-
cmake --build --preset win_msvc_af_cpu_ci_build_test
186-
187184
- name: Test
188185
shell: pwsh
189186
run: |

0 commit comments

Comments
 (0)