From d6a06307934f032a5fb138e8474bb40ff7fc80af Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 12:52:56 +0000 Subject: [PATCH 1/2] feat: move vcpkg archives and registries to project local cache for CI Redirects vcpkg downloads and registry caches to a project-local directory (`.vcpkg_cache`) by setting `VCPKG_DOWNLOADS` and `X_VCPKG_REGISTRIES_CACHE` environment variables in setup scripts. Updates CI workflows to cache `.vcpkg_cache`, ensuring that dependency sources and registry metadata are preserved between runs, preventing unnecessary rebuilds and re-downloads. Resolves #212. --- .github/workflows/android.yml | 2 ++ .github/workflows/ios.yml | 2 ++ .github/workflows/linux.yml | 2 ++ .github/workflows/macos.yml | 2 ++ .github/workflows/windows.yml | 2 ++ .gitignore | 1 + vcpkg.ps1 | 13 +++++++++++++ vcpkg.sh | 9 +++++++++ 8 files changed, 33 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index e8946fad..cfbac284 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -47,6 +47,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ runner.os }}-android-bincache - name: Compile gkNextRenderer @@ -60,5 +61,6 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }} diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index aceea085..006e67a8 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -48,6 +48,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ runner.os }}-ios-bincache - name: Compile gkNextRenderer @@ -63,6 +64,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4c98cabb..72cb988b 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -45,6 +45,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ runner.os }}-desktop-bincache - name: Compile gkNextRenderer @@ -58,6 +59,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 373e5a76..70d17777 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -48,6 +48,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ runner.os }}-desktop-bincache - name: Compile gkNextRenderer @@ -63,6 +64,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }} diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b1e4df2b..281edc02 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -44,6 +44,7 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ runner.os }}-desktop-bincache - name: Setup MSBuild @@ -63,4 +64,5 @@ jobs: path: | .vcpkg .vcpkg_bincache + .vcpkg_cache key: ${{ steps.cache-vcpkg-restore.outputs.cache-primary-key }} diff --git a/.gitignore b/.gitignore index 38d1046a..61ad0edd 100644 --- a/.gitignore +++ b/.gitignore @@ -369,3 +369,4 @@ src/ThirdParty/Streamline/ # Claude Code files .claude/ lib/ +.vcpkg_cache/ diff --git a/vcpkg.ps1 b/vcpkg.ps1 index 24df2696..e995999c 100644 --- a/vcpkg.ps1 +++ b/vcpkg.ps1 @@ -9,6 +9,13 @@ $ScriptDir = $PSScriptRoot $ProjectRoot = $ScriptDir $DefaultVcpkgRoot = Join-Path $ProjectRoot ".vcpkg" $VcpkgDefaultBinaryCache = Join-Path $ProjectRoot ".vcpkg_bincache" +$VcpkgDownloads = Join-Path $ProjectRoot ".vcpkg_cache/downloads" +$VcpkgRegistriesCache = Join-Path $ProjectRoot ".vcpkg_cache/registries" + +# Set Environment Variables +$env:VCPKG_DEFAULT_BINARY_CACHE = $VcpkgDefaultBinaryCache +$env:VCPKG_DOWNLOADS = $VcpkgDownloads +$env:X_VCPKG_REGISTRIES_CACHE = $VcpkgRegistriesCache # Configuration $VcpkgGitRef = "2025.12.12" @@ -37,6 +44,12 @@ foreach ($Arg in $AllArgs) { if (-not (Test-Path $VcpkgDefaultBinaryCache)) { New-Item -ItemType Directory -Path $VcpkgDefaultBinaryCache -Force | Out-Null } +if (-not (Test-Path $VcpkgDownloads)) { + New-Item -ItemType Directory -Path $VcpkgDownloads -Force | Out-Null +} +if (-not (Test-Path $VcpkgRegistriesCache)) { + New-Item -ItemType Directory -Path $VcpkgRegistriesCache -Force | Out-Null +} $VcpkgRoot = $env:VCPKG_ROOT if ([string]::IsNullOrWhiteSpace($VcpkgRoot)) { diff --git a/vcpkg.sh b/vcpkg.sh index d9ca5236..f5a46c57 100755 --- a/vcpkg.sh +++ b/vcpkg.sh @@ -10,9 +10,18 @@ init_variables() { PROJECT_ROOT="$SCRIPT_DIR" DEFAULT_VCPKG_ROOT="$PROJECT_ROOT/.vcpkg" export VCPKG_DEFAULT_BINARY_CACHE="$PROJECT_ROOT/.vcpkg_bincache" + export VCPKG_DOWNLOADS="$PROJECT_ROOT/.vcpkg_cache/downloads" + export X_VCPKG_REGISTRIES_CACHE="$PROJECT_ROOT/.vcpkg_cache/registries" + if [ ! -d "$VCPKG_DEFAULT_BINARY_CACHE" ]; then mkdir -p "$VCPKG_DEFAULT_BINARY_CACHE" fi + if [ ! -d "$VCPKG_DOWNLOADS" ]; then + mkdir -p "$VCPKG_DOWNLOADS" + fi + if [ ! -d "$X_VCPKG_REGISTRIES_CACHE" ]; then + mkdir -p "$X_VCPKG_REGISTRIES_CACHE" + fi VCPKG_ROOT="${VCPKG_ROOT:-$DEFAULT_VCPKG_ROOT}" VCPKG_EXE="$VCPKG_ROOT/vcpkg" VCPKG_GIT_REF="2025.12.12" From 92445539443fb6c4ebcebc05360c2ae7dc626b3a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 13:14:17 +0000 Subject: [PATCH 2/2] fix: use VCPKG_BINARY_SOURCES instead of VCPKG_DEFAULT_BINARY_CACHE Switches from using `VCPKG_DEFAULT_BINARY_CACHE` to the more explicit `VCPKG_BINARY_SOURCES` variable for configuring the local binary cache, as requested during review. The downloads and registries cache configurations remain in place to ensure CI caching works as intended. --- vcpkg.ps1 | 2 +- vcpkg.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/vcpkg.ps1 b/vcpkg.ps1 index e995999c..9478535b 100644 --- a/vcpkg.ps1 +++ b/vcpkg.ps1 @@ -13,7 +13,7 @@ $VcpkgDownloads = Join-Path $ProjectRoot ".vcpkg_cache/downloads" $VcpkgRegistriesCache = Join-Path $ProjectRoot ".vcpkg_cache/registries" # Set Environment Variables -$env:VCPKG_DEFAULT_BINARY_CACHE = $VcpkgDefaultBinaryCache +$env:VCPKG_BINARY_SOURCES = "clear;files,$VcpkgDefaultBinaryCache,readwrite" $env:VCPKG_DOWNLOADS = $VcpkgDownloads $env:X_VCPKG_REGISTRIES_CACHE = $VcpkgRegistriesCache diff --git a/vcpkg.sh b/vcpkg.sh index f5a46c57..df453417 100755 --- a/vcpkg.sh +++ b/vcpkg.sh @@ -9,12 +9,12 @@ init_variables() { SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PROJECT_ROOT="$SCRIPT_DIR" DEFAULT_VCPKG_ROOT="$PROJECT_ROOT/.vcpkg" - export VCPKG_DEFAULT_BINARY_CACHE="$PROJECT_ROOT/.vcpkg_bincache" + export VCPKG_BINARY_SOURCES="clear;files,$PROJECT_ROOT/.vcpkg_bincache,readwrite" export VCPKG_DOWNLOADS="$PROJECT_ROOT/.vcpkg_cache/downloads" export X_VCPKG_REGISTRIES_CACHE="$PROJECT_ROOT/.vcpkg_cache/registries" - if [ ! -d "$VCPKG_DEFAULT_BINARY_CACHE" ]; then - mkdir -p "$VCPKG_DEFAULT_BINARY_CACHE" + if [ ! -d "$PROJECT_ROOT/.vcpkg_bincache" ]; then + mkdir -p "$PROJECT_ROOT/.vcpkg_bincache" fi if [ ! -d "$VCPKG_DOWNLOADS" ]; then mkdir -p "$VCPKG_DOWNLOADS"