Skip to content

Commit 4ee6ecd

Browse files
authored
Merge pull request #1494 from OutpostUniverse/eliminateCacheSaveWarning
Eliminate cache save warning
2 parents fa4e6af + dc30952 commit 4ee6ecd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/build.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
3636
- name: Restore vcpkg dependency cache
3737
uses: actions/cache/restore@v4
38+
id: cacheRestoreVcpkg
3839
with:
3940
path: vcpkg_installed
4041
key: vcpkgCache-${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}
@@ -45,9 +46,10 @@ jobs:
4546
4647
- name: Save vcpkg dependency cache
4748
uses: actions/cache/save@v4
49+
if: steps.cacheRestoreVcpkg.outputs.cache-hit == 'false'
4850
with:
4951
path: vcpkg_installed
50-
key: vcpkgCache-${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}
52+
key: ${{ steps.cacheRestoreVcpkg.outputs.cache-primary-key }}
5153

5254
- name: Copy vcpkg cache to NAS2D folder
5355
run: |
@@ -71,6 +73,7 @@ jobs:
7173
7274
- name: Restore NAS2D cache
7375
uses: actions/cache/restore@v4
76+
id: cacheRestoreNas2d
7477
with:
7578
path: nas2d-core/.build/
7679
key: nas2dCache-${{ runner.os }}-${{ matrix.platform }}-${{ env.nas2dSha }}
@@ -84,12 +87,14 @@ jobs:
8487
8588
- name: Save build cache - NAS2D
8689
uses: actions/cache/save@v4
90+
if: steps.cacheRestoreNas2d.outputs.cache-hit == 'false'
8791
with:
8892
path: nas2d-core/.build/
89-
key: nas2dCache-${{ runner.os }}-${{ matrix.platform }}-${{ env.nas2dSha }}
93+
key: ${{ steps.cacheRestoreNas2d.outputs.cache-primary-key }}
9094

9195
- name: Restore incremental build cache
9296
uses: actions/cache/restore@v4
97+
id: cacheRestoreOphd
9398
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
9499
with:
95100
path: .build
@@ -134,6 +139,7 @@ jobs:
134139
135140
- name: Save incremental build cache - OPHD
136141
uses: actions/cache/save@v4
142+
if: steps.cacheRestoreOphd.outcome == 'skipped' || steps.cacheRestoreOphd.outputs.cache-hit == 'false'
137143
with:
138144
path: .build
139145
key: buildCache-${{ runner.os }}-${{ matrix.platform }}-${{ github.sha }}

0 commit comments

Comments
 (0)