Skip to content

Commit 496c40c

Browse files
committed
manual restore/save
1 parent c0ccfec commit 496c40c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

.github/workflows/build-on-windows.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ jobs:
6161
uses: lukka/run-vcpkg@v11
6262

6363
# lukka/run-vcpkg@v11 does not have a working cache implementation.
64-
- uses: actions/cache@v4
64+
- name: Restore vcpkg binary-cache
65+
id: restore-vcpkg-cache
66+
uses: actions/cache/restore@v4
6567
with:
6668
path: ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
6769
key: vcpkg-cache-${{hashFiles('vcpkg.json', 'vcpkg\vcpkgLastBuiltCommitId')}}
@@ -71,6 +73,14 @@ jobs:
7173
with:
7274
configurePreset: 'x64-windows'
7375

76+
- name: Save vcpkg binary-cache
77+
uses: actions/cache/save@v4
78+
id: save-vcpkg-cache
79+
if: steps.restore-vcpkg-cache.outputs.cache-hit != 'true'
80+
with:
81+
path: ${{env.VCPKG_DEFAULT_BINARY_CACHE}}
82+
key: ${{steps.restore-vcpkg-cache.outputs.cache-primary-key}}
83+
7484
- name: Build application (Debug)
7585
uses: lukka/run-cmake@v10
7686
with:
@@ -91,7 +101,7 @@ jobs:
91101

92102
- name: Publish Test Results
93103
uses: EnricoMi/publish-unit-test-result-action/windows@v2 # https://github.com/EnricoMi/publish-unit-test-result-action
94-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
104+
if: always() && github.event_name == 'push' && github.ref == 'refs/heads/main'
95105
with:
96106
files: |
97107
${{env.DEBUG_BUILD_DIR}}\hktests-dbg.xml

0 commit comments

Comments
 (0)