Skip to content

Commit 39cae7d

Browse files
committed
update windows.yml
1 parent f455070 commit 39cae7d

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/windows.yml

+7-6
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
ver:
1212
- { onnx: v1.15.1, python: 3.8.10, jdk: 8, gradle: 8.0.1 }
1313
list:
14-
- { win_ver: 2019, vs_name: vs2019, vs_ver: v142 }
15-
- { win_ver: 2022, vs_name: vs2022, vs_ver: v143 }
14+
- { win_ver: 2019, vs_name: vs2019, vs_ver: v142, vs_path: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' }
15+
- { win_ver: 2022, vs_name: vs2022, vs_ver: v143, vs_path: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise' }
1616
crt:
1717
[
1818
md,
@@ -65,26 +65,27 @@ jobs:
6565
- name: copy build script
6666
run: |
6767
cp ${{ env.BUILD_SCRIPT }} onnxruntime-${{ matrix.ver.onnx }}
68+
cp Launch-VsDevShell.ps1 onnxruntime-${{ matrix.ver.onnx }}
6869
6970
- name: build x64
7071
shell: powershell
7172
run: |
7273
cd onnxruntime-${{ matrix.ver.onnx }}
73-
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' -SkipAutomaticLocation -HostArch amd64 -Arch amd64
74+
& '.\Launch-VsDevShell.ps1' -VsInstallationPath '${{ matrix.list.vs_path }}' -SkipAutomaticLocation -HostArch amd64 -Arch amd64
7475
.\${{ env.BUILD_SCRIPT }} -VsArch x64 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }}
7576
7677
- name: build x86
7778
shell: powershell
7879
run: |
7980
cd onnxruntime-${{ matrix.ver.onnx }}
80-
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' -SkipAutomaticLocation -HostArch amd64 -Arch x86
81+
& '.\Launch-VsDevShell.ps1' -VsInstallationPath '${{ matrix.list.vs_path }}' -SkipAutomaticLocation -HostArch amd64 -Arch x86
8182
.\${{ env.BUILD_SCRIPT }} -VsArch x86 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }}
8283
8384
- name: build arm64
8485
shell: powershell
8586
run: |
8687
cd onnxruntime-${{ matrix.ver.onnx }}
87-
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' -SkipAutomaticLocation -HostArch amd64 -Arch arm64
88+
& '.\Launch-VsDevShell.ps1' -VsInstallationPath '${{ matrix.list.vs_path }}' -SkipAutomaticLocation -HostArch amd64 -Arch arm64
8889
.\${{ env.BUILD_SCRIPT }} -VsArch arm64 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }}
8990
9091
# install文件夹改名,并使用7z压缩
@@ -112,7 +113,7 @@ jobs:
112113
shell: powershell
113114
run: |
114115
cd onnxruntime-${{ matrix.ver.onnx }}
115-
& 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\Launch-VsDevShell.ps1' -SkipAutomaticLocation -HostArch amd64 -Arch amd64
116+
& '.\Launch-VsDevShell.ps1' -VsInstallationPath '${{ matrix.list.vs_path }}' -SkipAutomaticLocation -HostArch amd64 -Arch amd64
116117
.\${{ env.BUILD_SCRIPT }} -VsArch x64 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }} -BuildJava
117118
118119
- name: 7zip pack java libs

0 commit comments

Comments
 (0)