Skip to content

ci: fix MSVC build on windows-latest (VS 2019 path no longer exists) - #2

Merged
alexsmn merged 1 commit into
masterfrom
fix/ci-msvc-vcvars-path
Apr 21, 2026
Merged

ci: fix MSVC build on windows-latest (VS 2019 path no longer exists)#2
alexsmn merged 1 commit into
masterfrom
fix/ci-msvc-vcvars-path

Conversation

@alexsmn

@alexsmn alexsmn commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • windows-latest no longer ships VS 2019 Enterprise, so the hardcoded C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat silently fails — cl.exe ends up off PATH and CMake errors with Could not find compiler set in environment variable CC: cl.
  • Replace the brittle environment_script plumbing with ilammy/msvc-dev-cmd@v1, which locates whichever Visual Studio is installed on the runner and exports the env vars via GITHUB_ENV so they persist across subsequent steps.
  • Drop the per-step environment_script_output.txt re-parsing in Configure/Build — no longer needed now that env vars persist.

Fixes the failing Windows MSVC job in run 24650040774.

Test plan

  • Windows Latest MSVC configure/build/tests pass on this PR
  • Windows Latest MinGW job still passes (unchanged)
  • Ubuntu Latest GCC job still passes (unchanged)

🤖 Generated with Claude Code

windows-latest no longer ships VS 2019 Enterprise, so the hardcoded
vcvars64.bat path silently failed to execute and cl.exe was missing from
PATH, breaking CMake's compiler detection. Use ilammy/msvc-dev-cmd@v1,
which finds whichever Visual Studio is installed on the runner and
exports the env vars via GITHUB_ENV so they persist across steps.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexsmn
alexsmn merged commit 75e5554 into master Apr 21, 2026
3 checks passed
@alexsmn
alexsmn deleted the fix/ci-msvc-vcvars-path branch April 21, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant