Skip to content

Commit a530fd7

Browse files
committed
GHA: Use microsoft/setup-msbuild@v2
1 parent 8469f28 commit a530fd7

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/build.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ on: [push]
22
name: Build
33
jobs:
44
build:
5-
runs-on: [ windows-2019 ]
5+
runs-on: [ windows-2022 ]
66
env:
7-
VSPATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise'
87
EXTSITE: https://marketplace.visualstudio.com/items?itemName=visualstudioclient.MicrosoftVisualStudio2015InstallerProjects
98
EXTURL: https://marketplace.visualstudio.com/_apis/public/gallery/publishers/VisualStudioClient/vsextensions/MicrosoftVisualStudio2017InstallerProjects/1.0.0/vspackage
109
# The following envs are used in BrowserSelectorBHO.vcxproj
@@ -13,21 +12,24 @@ jobs:
1312
VSAPPIDNAME: 'devenv.exe'
1413
steps:
1514
- uses: actions/checkout@v4
15+
- name: Add msbuild to PATH
16+
uses: microsoft/setup-msbuild@v2
17+
- name: Install ATL for VS 2019
18+
run: |
19+
"%programfiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe" --add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64 --add Microsoft.VisualStudio.Component.VC.14.29.16.11.ATL --add Microsoft.VisualStudio.Component.VC.14.29.16.11.CLI.Support --quiet --norestart
1620
- name: Fetch Visual Studio addons
1721
run: |
1822
Invoke-WebRequest -OutFile Installer.html -UseBasicParsing -SessionVariable session $env:EXTSITE
1923
Invoke-WebRequest -OutFile InstallerProjects.vsix -WebSession $session $env:EXTURL
2024
- name: Build binaries
2125
shell: cmd
2226
run: |
23-
call "%VSPATH%\VC\Auxiliary\Build\vcvars32.bat"
2427
InstallerProjects.vsix /quiet InstallerProjects.vsix
2528
msbuild BrowserSelector.sln /m /p:Configuration=Release /p:Platform=Win32
2629
devenv BrowserSelectorSetup/BrowserSelectorSetup.vdproj /Build "Release|Win32"
2730
- name: Run tests
2831
shell: cmd
2932
run: |
30-
call "%VSPATH%\VC\Auxiliary\Build\vcvars32.bat"
3133
vstest.console Release\UnitTest.dll
3234
- name: Upload Installer
3335
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)