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:
20
20
uses : actions/cache@v3
21
21
id : cache-vcpkg
22
22
with :
23
- path : build/vcpkg_installed /
24
- key : vcpkg-x64-osx
23
+ path : build/vcpkg_cache /
24
+ key : vcpkg-binaries- x64-osx
25
25
26
26
- name : Create Build Environment
27
27
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
29
31
30
32
- name : Configure
31
33
shell : pwsh
34
36
$vcpkgToolchain = Join-Path $env:VCPKG_INSTALLATION_ROOT './scripts/buildsystems/vcpkg.cmake' -Resolve
35
37
$cmakeBuildType = '${{ matrix.config }}'
36
38
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
+
37
43
cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DCMAKE_BUILD_TYPE=$cmakeBuildType" ${{ github.workspace }}
38
44
39
45
- name : Build
You can’t perform that action at this time.
0 commit comments