Skip to content

Commit ddceb90

Browse files
jajikmarkt-asf
authored andcommitted
Make VsDevCmd.bat execution work independently of VS version in GH Actions
1 parent a14d978 commit ddceb90

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/windows.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,19 @@ jobs:
7878
shell: cmd
7979
run: |
8080
echo on
81-
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
81+
where /R "C:\Program Files\Microsoft Visual Studio" VsDevCmd.bat > vs_setup_path
82+
set /p SETUP_VS=< vs_setup_path
83+
call "%SETUP_VS%" -arch=${{ matrix.arch }}
8284
cd src/native/windows/apps/prunsrv
8385
echo "Building prunsrv for ${{ matrix.arch }}"
8486
nmake BUILD_CPU=${{ matrix.arch }}
8587
- name: Build prunmgr
8688
shell: cmd
8789
run: |
8890
echo on
89-
call "C:\Program Files\Microsoft Visual Studio\18\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }}
91+
set /p SETUP_VS=< vs_setup_path
92+
call "%SETUP_VS%" -arch=${{ matrix.arch }}
93+
del vs_setup_path
9094
cd src/native/windows/apps/prunmgr
9195
echo "Building prunmgr for ${{ matrix.arch }}"
9296
nmake BUILD_CPU=${{ matrix.arch }}

0 commit comments

Comments
 (0)