File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,13 +34,14 @@ jobs:
3434
3535 - name : Configure (Windows, vcpkg)
3636 if : runner.os == 'Windows'
37- shell : bash
3837 run : |
39- # The runner's pre-installed vcpkg may not contain the manifest's
40- # builtin-baseline commit, so fetch it before configuring.
41- BASE=$(jq -r '."builtin-baseline"' vcpkg.json)
42- git -C "$VCPKG_INSTALLATION_ROOT" fetch --depth 1 origin "$BASE"
43- cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
38+ # Sync the runner's vcpkg to the manifest's builtin-baseline so its
39+ # port/version database matches, then configure.
40+ $base = (Get-Content vcpkg.json | ConvertFrom-Json).'builtin-baseline'
41+ git -C "$env:VCPKG_INSTALLATION_ROOT" fetch --depth 1 origin $base
42+ git -C "$env:VCPKG_INSTALLATION_ROOT" checkout -f $base
43+ & "$env:VCPKG_INSTALLATION_ROOT\bootstrap-vcpkg.bat" -disableMetrics
44+ cmake -B build -S . "-DCMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
4445
4546 # --- build + verify install/export ---
4647 - name : Build
You can’t perform that action at this time.
0 commit comments