File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,14 @@ jobs:
2020 uses : actions/cache@v3
2121 id : cache-vcpkg
2222 with :
23- path : build/vcpkg_installed /
24- key : vcpkg-x64-osx
23+ path : build/vcpkg_cache /
24+ key : vcpkg-binaries- x64-osx
2525
2626 - name : Create Build Environment
2727 if : ${{ !steps.cache-vcpkg.outputs.cache-hit }}
28- run : cmake -E make_directory build
28+ run : |
29+ cmake -E make_directory build
30+ cmake -E make_directory build/vcpkg_cache
2931
3032 - name : Configure
3133 shell : pwsh
3436 $vcpkgToolchain = Join-Path $env:VCPKG_INSTALLATION_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve
3537 $cmakeBuildType = '${{ matrix.config }}'
3638
39+ $cachedBinaries = Join-Path $(Get-Location) './vcpkg_cache/' -Resolve
40+ $cacheAccess = $(if ('${{ steps.cache-vcpkg.outputs.cache-hit }}' -eq 'true') { 'read' } else { 'write' })
41+ $env:VCPKG_BINARY_SOURCES = "clear;files,$cachedBinaries,$cacheAccess"
42+
3743 cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ${{ github.workspace }}
3844
3945 - name : Build
You can’t perform that action at this time.
0 commit comments