Skip to content

Commit e03a6e9

Browse files
committed
Use PowerShell to build the environment variable
1 parent 4a8204d commit e03a6e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/windows.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ jobs:
4545
$vcpkgTriplet = '${{ steps.set-variables.outputs.vcpkg_triplet }}'
4646
$cmakeSharedLibs = $(if ('${{ matrix.libs }}' -eq 'shared') { 'ON' } else { 'OFF' })
4747
$msbuildArch = $(if ('${{ matrix.arch }}' -eq 'x64') { 'X64' } else { 'Win32' })
48-
$env:VCPKG_BINARY_SOURCES = "clear;files,${{ steps.configure-build.working-directory }}/vcpkg_cache/,$(if ${{ steps.cache-vcpkg.outputs.cache-hit }} { 'r' } else { 'rw' })"
48+
49+
$cachedBinaries = Join-Path $(Get-Location) './vcpkg_cache/' -Resolve
50+
$cacheAccess = $(if ${{ steps.cache-vcpkg.outputs.cache-hit }} { 'r' } else { 'rw' })
51+
$env:VCPKG_BINARY_SOURCES = "clear;files,$cachedBinaries,$cacheAccess"
4952
5053
cmake "-DCMAKE_TOOLCHAIN_FILE=$vcpkgToolchain" "-DVCPKG_TARGET_TRIPLET=$vcpkgTriplet" "-DBUILD_SHARED_LIBS=$cmakeSharedLibs" -G "Visual Studio 17 2022" -A "$msbuildArch" ${{ github.workspace }}
5154

0 commit comments

Comments
 (0)