From eb49a304b6ecbb200e94e720446ae540067ea9a4 Mon Sep 17 00:00:00 2001 From: yhirose Date: Wed, 6 May 2026 08:25:56 -0400 Subject: [PATCH] Use vswhere to locate VS install in 32-bit Windows CI (#2442) The hosted windows-latest runner is migrating from VS 2022 to VS 2026 (NOTICE: windows-2025 -> windows-2025-vs2026 by 2026-05-12). The hardcoded path C:\Program Files\Microsoft Visual Studio\2022\Enterprise no longer exists on the new image, so vcvarsall.bat silently fails and 'cl' is not on PATH. Resolve the install path via vswhere.exe (stable location, version agnostic) and exit if vcvarsall.bat fails so future breakage surfaces immediately instead of as a confusing 'cl not recognized' error. --- .github/workflows/test-32bit.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-32bit.yml b/.github/workflows/test-32bit.yml index 2fa0337..45d3393 100644 --- a/.github/workflows/test-32bit.yml +++ b/.github/workflows/test-32bit.yml @@ -21,7 +21,8 @@ jobs: - name: Build (Win32) shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set VSDIR=%%i + call "%VSDIR%\VC\Auxiliary\Build\vcvarsall.bat" x86 || exit /b 1 cl /std:c++14 /EHsc /W4 /WX /c /Fo:NUL test\test_32bit_build.cpp test-arm32: