ci: fix Windows build by forcing Ninja cmake generator#407
Open
revmischa wants to merge 2 commits into
Open
Conversation
The cmake build-dependency of sdl3-sys panics with "couldn't determine visual studio generator" on current windows-latest images, breaking the Windows build job for every PR since mid-June. Set up the MSVC environment and pin CMAKE_GENERATOR=Ninja so the build no longer relies on cmake's broken VS-version autodetection.
Under Git bash, rustc resolves link.exe to Git's usr/bin/link.exe instead of the MSVC linker once the VS dev environment is set up. Drop shell: bash so Windows uses pwsh, and collapse the build command to a single line that works in both bash and pwsh.
revmischa
force-pushed
the
ci/fix-windows-cmake-generator
branch
from
July 12, 2026 06:26
c571ac5 to
8a28b6b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Windows build jobs have failed on every PR since mid-June. The
cmakebuild-dependency ofsdl3-sys(building SDL3 from source) panics before any crate code is compiled:Successful runs through Jun 9, broken Jun 15 onward across unrelated PRs, which lines up with a
windows-latestimage bump to a Visual Studio version that the pinned cmake-rs can't map to a generator. The workflow had no MSVC setup and never setCMAKE_GENERATOR, so it relied entirely on that autodetection.Set up the MSVC environment with msvc-dev-cmd and force
CMAKE_GENERATOR=Ninja(Ninja ships with VS) on Windows only, bypassing the broken VS-version detection. Linux and macOS are untouched.Action is pinned to a commit SHA to match the existing workflow convention.