From 3263b0b4cb556d735ea585b43bc90e7c58d16715 Mon Sep 17 00:00:00 2001 From: Shirona1337 Date: Mon, 1 Jun 2026 00:55:19 +0800 Subject: [PATCH] ci(loader): pin vcpkg baseline so the Qt cache stops missing The vcpkg install was cloned at a floating HEAD while native/vcpkg.json carried no builtin-baseline, so every run resolved the qtbase port afresh. Its package ABI drifted whenever upstream vcpkg moved, the restored actions/cache entry no longer matched, and qtbase was rebuilt from source (~31 min) on every push. Because the cache key is static (hash of vcpkg.json, unchanged since 05-23) the rebuilt tree was never saved back either, so the miss repeated forever. Pin both sides to vcpkg tag 2026.05.25 (d015e31e90838a4c9dfa3eed45979bc70d9357fc, qtbase 6.11.0): - native/vcpkg.json: add "builtin-baseline" - workflow: clone --branch 2026.05.25 Adding the baseline also changes the vcpkg.json hash, so this run gets a fresh cache key, cold-builds Qt once, and saves it; subsequent runs match the now-deterministic ABI and skip the qtbase build entirely. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/build-loader.yml | 10 +++++++++- native/vcpkg.json | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-loader.yml b/.github/workflows/build-loader.yml index 85f65ce..fbfd2b2 100644 --- a/.github/workflows/build-loader.yml +++ b/.github/workflows/build-loader.yml @@ -88,11 +88,19 @@ jobs: - name: Clone & bootstrap vcpkg shell: pwsh run: | + # Pin vcpkg to the SAME commit as native/vcpkg.json's + # "builtin-baseline". A floating HEAD clone made the qtbase port + # (and thus its package ABI) drift every time upstream vcpkg moved, + # so the restored Qt cache never matched and qtbase was rebuilt + # from source (~31 min) on every run. Tag 2026.05.25 == + # d015e31e90838a4c9dfa3eed45979bc70d9357fc and ships qtbase 6.11.0. + # Keep this tag and the builtin-baseline in vcpkg.json in lockstep. + $vcpkgTag = '2026.05.25' $vcpkg = Join-Path $env:GITHUB_WORKSPACE 'vcpkg' if (Test-Path $vcpkg) { Write-Host "Reusing existing $vcpkg" } else { - git clone --depth=1 https://github.com/microsoft/vcpkg.git $vcpkg + git clone --depth=1 --branch $vcpkgTag https://github.com/microsoft/vcpkg.git $vcpkg } & "$vcpkg\bootstrap-vcpkg.bat" -disableMetrics & "$vcpkg\vcpkg.exe" version diff --git a/native/vcpkg.json b/native/vcpkg.json index 7bfe14f..7a422ea 100644 --- a/native/vcpkg.json +++ b/native/vcpkg.json @@ -9,5 +9,6 @@ "default-features": false, "features": [ "widgets" ] } - ] + ], + "builtin-baseline": "d015e31e90838a4c9dfa3eed45979bc70d9357fc" }