Skip to content

Commit 54e7895

Browse files
okohlbacherclaude
andcommitted
ci: stop caching compiler-pinned CMakeCache on Windows (fixes runner-image-bump breakage)
Scheduled CI run 27544121035 (master, 2026-06-15) failed only on windows-x64 at CMake PROJECT(): 'CMAKE_C_COMPILER .../MSVC/14.44.35207/.../cl.exe is not a full path to an existing compiler tool'. Root cause: the 'Cache Windows CMake build tree' step cached build/ci-windows/CMakeCache.txt + CMakeFiles/ + build.ninja, which embed the absolute MSVC path, but the cache key hashed only source files — not the runner image. Today's windows-2025 -> vs2026 image migration bumped MSVC past 14.44.35207, so the restored CMakeCache pointed at a deleted compiler. Fix: cache ONLY build/ci-windows/vcpkg_installed/ (the expensive deps) and let CMake re-detect the compiler every run (cheap; objects still warm from the separate ccache). Eliminates the pinned-compiler staleness class for all future runner bumps. Key bumped to v3 to drop poisoned v2 entries. Supersedes the deferred Phase 999.36 per-source-hash idea. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 30b5f7c commit 54e7895

1 file changed

Lines changed: 17 additions & 16 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -257,28 +257,29 @@ jobs:
257257
# not from this cache. Windows-only; macOS+Linux configure in <30s already.
258258
# ci.yml itself is NOT in hashFiles() — editing this comment triggers a warm run
259259
# that exercises the cache-HIT path without invalidating the cmake-tree key.
260-
- name: Cache Windows CMake build tree
260+
- name: Cache Windows vcpkg deps
261261
if: matrix.os == 'windows-x64'
262262
uses: actions/cache@v5
263263
with:
264+
# Cache ONLY vcpkg_installed/ — the expensive Boost/FFTW/etc. build.
265+
# Do NOT cache CMakeCache.txt / CMakeFiles/ / build.ninja: those embed
266+
# the absolute MSVC compiler path (e.g. .../MSVC/14.44.35207/.../cl.exe),
267+
# while the key below hashes only source files, not the runner image.
268+
# When GitHub bumps the windows runner image (the 2026-06-15 windows-2025
269+
# → vs2026 migration bumped MSVC past 14.44.35207), the pinned compiler
270+
# path disappears and a restored CMakeCache makes PROJECT() fail with
271+
# "not a full path to an existing compiler tool" (see scheduled run
272+
# 27544121035). Letting CMake re-detect the compiler each run — cheap
273+
# once vcpkg_installed is warm; objects still come from the separate
274+
# ccache — eliminates that whole failure class. (Supersedes the deferred
275+
# Phase 999.36 per-source-hash invalidation idea, which this makes moot.)
276+
# v3: drops the compiler-pinned paths from v2 and invalidates poisoned
277+
# entries left by the runner-image bump.
264278
path: |
265-
build/ci-windows/CMakeCache.txt
266-
build/ci-windows/CMakeFiles/
267-
build/ci-windows/build.ninja
268279
build/ci-windows/vcpkg_installed/
269-
# v2 suffix forces cache invalidation after the cb392cc4 BALL_EXPORT
270-
# masking bug (2026-05-17): the previous key didn't include source-
271-
# file hashes, so source-only defects in DLL-export contracts could
272-
# be masked by a warm cached CMakeFiles/. Bumping the version suffix
273-
# forces a cold rebuild that catches the BALL_EXPORT restoration in
274-
# 9042af07 and any similar future regression. Follow-up Phase 999.36
275-
# is filed to add a per-source-hash invalidation arm.
276-
# Phase 999.48 §8.7 step (b) — the prior ui_v2 suffix on this
277-
# key (preventing OFF tree → ON build short-circuit) is no
278-
# longer needed; the BALL_UI_V2 axis was removed with the flag.
279-
key: ci-windows-cmake-tree-v2-${{ hashFiles('CMakeLists.txt', 'cmake/**', 'vcpkg.json', 'CMakePresets.json') }}
280+
key: ci-windows-vcpkg-v3-${{ hashFiles('vcpkg.json', 'CMakePresets.json') }}
280281
restore-keys: |
281-
ci-windows-cmake-tree-v2-
282+
ci-windows-vcpkg-v3-
282283
283284
# ======================================================================
284285
# macOS — Homebrew deps + the verbatim BUILD-macos.md flow.

0 commit comments

Comments
 (0)