From 528b0fde5620e62eb8195539fbbdd37db4cbc056 Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Sat, 9 May 2026 13:41:46 -0700 Subject: [PATCH] replace hard-coded visual studio path with vswhere --- .github/workflows/builds.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 30aebcbd..774afbc3 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -64,7 +64,8 @@ jobs: - name: build (vs 2022) shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VS_INSTALL=%%i" + call "%VS_INSTALL%\VC\Auxiliary\Build\vcvarsall.bat" x64 call build meta "${{ matrix.target }}" "${{ matrix.compiler }}" "${{ matrix.mode }}" || exit /b 1 run-ubuntu-24-04: @@ -123,7 +124,8 @@ jobs: - name: Run shell: cmd run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VS_INSTALL=%%i" + call "%VS_INSTALL%\VC\Auxiliary\Build\vcvarsall.bat" x64 call run.bat ${{ matrix.compiler }} ${{ matrix.mode }} -- --gen_crash_dump || exit /b 1 - name: Upload Artifacts if: failure()