Call vcvars64.bat for unit test environment #106
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
permissions: read-all | |
jobs: | |
unittest: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4.1.1 | |
- name: Setup msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build unit test | |
run: msbuild SimpleComTest\SimpleComTest.vcxproj -property:"Configuration=Debug" -property:"Platform=x64" | |
- name: Run unit test | |
shell: cmd | |
run: | | |
for /f "delims=" %i in ('vswhere.exe -latest -property installationPath') do set VSPath=%i | |
call "%VSPath%\VC\Auxiliary\Build\vcvars64.bat" | |
vstest.console.exe /Platform:x64 SimpleComTest\x64\Debug\SimpleComTest.dll |