Skip to content

[CP] Default Windows CI builds to Visual Studio 18 2026 (#6100)#6104

Merged
guhetier merged 1 commit into
release/2.5from
guhetier/ci_vs2026_release_2_5_copilot
Jun 16, 2026
Merged

[CP] Default Windows CI builds to Visual Studio 18 2026 (#6100)#6104
guhetier merged 1 commit into
release/2.5from
guhetier/ci_vs2026_release_2_5_copilot

Conversation

@guhetier

@guhetier guhetier commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Description

GitHub's windows-2025 and windows-latest hosted runner images no longer ship Visual Studio 17 2022. Every Windows build job that targets those images currently fails with:

CMake Error at CMakeLists.txt:42 (project):
  Generator
    Visual Studio 17 2022
  could not find any instance of Visual Studio.

This change:

  • makes Visual Studio 18 2026 the default CMake generator for Windows builds, and override it back to Visual Studio 17 2022 for jobs that are still pinned to windows-2022 (which will soon be out of support).
  • remove the action to setup perl
    • the perl present by default in windows-2022 and up is recent enough
    • it was installing a CMake version that was shadowing the CMake from the runner image
  • fix some path separator issues in the Rust build, causing failure with the more recent CMake
  • fix the sanitize build (more annotations to disable with VS 18)

Testing

CI now succeeds

Documentation

docs/BUILD.md gains a VS 2026 example block. No other doc impact.

The windows-2025 runner image now ships VS 2026 instead of VS 2022.
Update the default CMake generator to Visual Studio 18 2026 and add
-Generator overrides for windows-2022 jobs that still use VS 2022.

Changes:
- build.ps1: default generator -> Visual Studio 18 2026
- build-reuse-win.yml: remove setup-perl (Perl preinstalled on runners),
  add -Generator conditional for windows-2022
- cargo.yml: remove setup-perl
- test-down-level.yml: remove setup-perl, add -Generator conditional
- external/CMakeLists.txt: add _DISABLE_OPTIONAL_ANNOTATION to fix
  VS 2026 STL annotation mismatch with ASan builds

Cherry-pick of main commit bbd5db9 adapted for release/2.5.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@guhetier guhetier changed the title ci: Switch default CMake generator to VS 18 2026 (release/2.5) [CP] Default Windows CI builds to Visual Studio 18 2026 (#6100) Jun 16, 2026
@guhetier guhetier marked this pull request as ready for review June 16, 2026 18:00
@guhetier guhetier requested a review from a team as a code owner June 16, 2026 18:00
@guhetier guhetier merged commit 5914869 into release/2.5 Jun 16, 2026
281 of 283 checks passed
@guhetier guhetier deleted the guhetier/ci_vs2026_release_2_5_copilot branch June 16, 2026 19:49
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.

2 participants