Skip to content

Commit 61ab187

Browse files
committed
Try caching vcpkg binary caching
1 parent 1d65922 commit 61ab187

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/windows.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,21 @@ jobs:
2727
uses: actions/cache@v3
2828
id: cache-vcpkg
2929
with:
30-
path: build/vcpkg_installed/
30+
path: build/vcpkg_cache/
3131
key: vcpkg-${{ steps.set-variables.outputs.vcpkg_triplet }}
3232

3333
- name: Create Build Environment
3434
if: ${{ !steps.cache-vcpkg.outputs.cache-hit }}
35-
run: cmake -E make_directory build
35+
run: |
36+
cmake -E make_directory build
37+
cmake -E make_directory build/vcpkg_cache
3638
3739
- name: Configure
40+
id: configure-build
3841
shell: pwsh
3942
working-directory: build/
43+
env:
44+
VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.configure-build.working-directory }}/vcpkg_cache/,$(if ${{ steps.cache-vcpkg.outputs.cache-hit }} { "r" } else { "rw" })'
4045
run: |
4146
$vcpkgToolchain = Join-Path $env:VCPKG_INSTALLATION_ROOT '.\scripts\buildsystems\vcpkg.cmake' -Resolve
4247
$vcpkgTriplet = '${{ steps.set-variables.outputs.vcpkg_triplet }}'

0 commit comments

Comments
 (0)