Skip to content

CI(Windows): pin msvc-2022 toolset to v143 / vcvars_ver=14.4#6186

Merged
Fedr merged 2 commits into
masterfrom
ci/windows-pin-msvc-2022-toolset
May 30, 2026
Merged

CI(Windows): pin msvc-2022 toolset to v143 / vcvars_ver=14.4#6186
Fedr merged 2 commits into
masterfrom
ci/windows-pin-msvc-2022-toolset

Conversation

@Fedr
Copy link
Copy Markdown
Contributor

@Fedr Fedr commented May 30, 2026

Summary

Pin the MSVC toolset explicitly on the msvc-2022 Windows leg so a newer compiler shipped inside the same Visual Studio install can't be picked up implicitly on an AMI bump. The msvc-2019 leg was already pinned (14.2 / v142); this brings msvc-2022 to 14.4 / v143.

The per-compiler values are derived into two job-level env vars using the same fromJSON([...])[cxx_compiler == 'msvc-2019'] idiom already used for CUDA_VERSION, so they live in one place:

  • VCVARS_VER-vcvars_ver at all 6 VsDevCmd.bat call sites (C/C# bindings, CMake build, Python bindings, C++/C examples).
  • PLATFORM_TOOLSET;PlatformToolset= on the MSBuild leg.

Note on 14.4 (not 14.3): -vcvars_ver prefix-matches an installed MSVC toolset directory, and the v143 line moved into the 14.4x numbering. The runner currently installs 14.44, which 14.4 resolves to. PlatformToolset=v143 is the stable MSBuild name and is unaffected.

Test plan

Verified on the PR (minimal) Windows config — log lines confirm the resolved toolset per leg:

  • msvc-2022 CMake (Release) — -vcvars_ver=14.4 resolves to MSVC 19.44.35227.0 (VC\Tools\MSVC\14.44.35207)
  • msvc-2022 MSBuild (Debug) — built with ;PlatformToolset=v143 against 14.44.35207
  • msvc-2019 CMake (Release + iterator-debug) unchanged — -vcvars_ver=14.2 resolves to MSVC 19.29.30159.0 (14.29.30133)
  • MRBind C / C# / Python bindings generate and build green on the affected legs

Full per-config matrix (Debug+Release × CMake+MSBuild, both compilers) runs on master after merge.

Previously only the msvc-2019 leg was pinned (vcvars_ver=14.2 at the
VsDevCmd sites, PlatformToolset=v142 for MSBuild) while msvc-2022 fell
through to whatever toolset the VS install defaults to. Pin msvc-2022
explicitly so a newer MSVC shipped inside the same VS install can't be
picked up implicitly on an AMI bump. 14.4 prefix-matches the currently
installed 14.44 toolset (v143); PlatformToolset=v143 is the stable
MSBuild name.
… vars

Move the toolset pin out of the inline call-site fromJSON expressions
into two job-level env vars defined the same way as CUDA_VERSION, so the
per-compiler values live in one place instead of being repeated at each
VsDevCmd / MSBuild call site.
@Fedr Fedr merged commit fef64b4 into master May 30, 2026
26 checks passed
@Fedr Fedr deleted the ci/windows-pin-msvc-2022-toolset branch May 30, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant