From 95a39502f08fab82135b6d7dcff2a7be7b0f1d7f Mon Sep 17 00:00:00 2001 From: Florian Angerer Date: Thu, 25 Jun 2026 15:07:06 +0200 Subject: [PATCH] Fix Windows CI Visual Studio setup --- .github/workflows/ci-matrix-gen.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-matrix-gen.yml b/.github/workflows/ci-matrix-gen.yml index abe268fe93..8920a5c6b5 100644 --- a/.github/workflows/ci-matrix-gen.yml +++ b/.github/workflows/ci-matrix-gen.yml @@ -260,7 +260,19 @@ jobs: if: ${{ matrix.run_steps && runner.os == 'Windows' }} shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" + if not exist "%VSWHERE%" set "VSWHERE=C:\ProgramData\Chocolatey\bin\vswhere.exe" + if not exist "%VSWHERE%" ( + echo Could not find vswhere.exe + exit /b 1 + ) + for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -latest`) do set "VS_INSTALL_DIR=%%i" + if not defined VS_INSTALL_DIR ( + echo Could not find Visual Studio with VC tools + exit /b 1 + ) + call "%VS_INSTALL_DIR%\VC\Auxiliary\Build\vcvarsall.bat" x64 + where dumpbin ${{ matrix.run_steps }} - name: Tar artifacts