replace hard-coded visual studio path with vswhere

This commit is contained in:
Nikita Smith
2026-06-02 12:10:26 -07:00
committed by Ryan Fleury
parent 3e9fff93f1
commit 528b0fde56
+4 -2
View File
@@ -64,7 +64,8 @@ jobs:
- name: build (vs 2022) - name: build (vs 2022)
shell: cmd shell: cmd
run: | 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 call build meta "${{ matrix.target }}" "${{ matrix.compiler }}" "${{ matrix.mode }}" || exit /b 1
run-ubuntu-24-04: run-ubuntu-24-04:
@@ -123,7 +124,8 @@ jobs:
- name: Run - name: Run
shell: cmd shell: cmd
run: | 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 call run.bat ${{ matrix.compiler }} ${{ matrix.mode }} -- --gen_crash_dump || exit /b 1
- name: Upload Artifacts - name: Upload Artifacts
if: failure() if: failure()