diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index b830668d74b..e836c851e60 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -59,6 +59,10 @@ jobs: - name: Configure CMake shell: cmd run: | + where /R "C:\Program Files\Microsoft Visual Studio" VsDevCmd.bat > vs_setup_path + set /p SETUP_VS=< vs_setup_path + call "%SETUP_VS%" -arch=${{ matrix.arch }} + cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} ^ -G "${{ matrix.generator }}" ^ -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ^ @@ -68,4 +72,7 @@ jobs: - name: Build shell: cmd run: | + set /p SETUP_VS=< vs_setup_path + call "%SETUP_VS%" -arch=${{ matrix.arch }} + del vs_setup_path cmake --build ${{github.workspace}}/build --config ${{ matrix.build-type }}