Skip to content

Commit b494bcb

Browse files
committed
ci(vcpkg): Create cache directory before vcpkg runs to fix VCPKG_DEFAULT_BINARY_CACHE error
1 parent 1efd1ff commit b494bcb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ jobs:
139139
# Override VCPKG_DEFAULT_BINARY_CACHE that lukka/run-vcpkg sets to its own temp dir
140140
# This ensures vcpkg uses our cached directory instead
141141
$cacheDir = "${{ github.workspace }}\vcpkg-bincache"
142+
# Ensure the cache directory exists (cache restore may not create it on miss)
143+
New-Item -ItemType Directory -Force -Path $cacheDir | Out-Null
142144
$env:VCPKG_DEFAULT_BINARY_CACHE = $cacheDir
143145
$env:VCPKG_BINARY_SOURCES = "clear;files,$cacheDir,readwrite"
144146
"VCPKG_DEFAULT_BINARY_CACHE=$cacheDir" >> $env:GITHUB_ENV

0 commit comments

Comments
 (0)