Skip to content

Commit df7a87c

Browse files
committed
refactor(GitHub workflows - MSVC): install & setup Visual Studio 2022 Preview
1 parent 528666d commit df7a87c

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

.github/workflows/msvc.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,21 @@ jobs:
3838
run: |
3939
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
4040
41-
- name: Setup MSBuild (VS 2022 Preview)
42-
uses: microsoft/setup-msbuild@v2
43-
with:
44-
msbuild-architecture: x64
45-
vs-version: "[17.12,17.13)" # Visual Studio 2022 (17)
46-
vs-prerelease: true
41+
- name: Install Visual Studio 2022 Community (Preview)
42+
run: |
43+
choco install visualstudio2022community-preview -y --pre --limit-output
44+
shell: pwsh
45+
46+
- name: Find latest Visual Studio 2022
47+
run: |
48+
$vsPath = &"$env:ProgramData\Chocolatey\bin\vswhere.exe" -prerelease -latest -products * -requires Microsoft.Component.MSBuild -property installationPath
49+
echo "VSINSTALLDIR=$vsPath" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8
50+
shell: pwsh
4751

48-
- name: Setup CMake
49-
uses: jwlawson/actions-setup-cmake@v2
50-
with:
51-
cmake-version: '3.25.x'
52+
- name: Setup Visual Studio 2022 environment
53+
run: |
54+
call "${{ env.VSINSTALLDIR }}\VC\Auxiliary\Build\vcvarsall.bat" x64
55+
shell: cmd
5256

5357
- name: Configure CMake
5458
run: >

0 commit comments

Comments
 (0)