|
11 | 11 | ver:
|
12 | 12 | - { onnx: v1.15.1, python: 3.8.10, jdk: 8, gradle: 8.0.1 }
|
13 | 13 | 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' } |
16 | 16 | crt:
|
17 | 17 | [
|
18 | 18 | md,
|
@@ -65,26 +65,27 @@ jobs:
|
65 | 65 | - name: copy build script
|
66 | 66 | run: |
|
67 | 67 | cp ${{ env.BUILD_SCRIPT }} onnxruntime-${{ matrix.ver.onnx }}
|
| 68 | + cp Launch-VsDevShell.ps1 onnxruntime-${{ matrix.ver.onnx }} |
68 | 69 |
|
69 | 70 | - name: build x64
|
70 | 71 | shell: powershell
|
71 | 72 | run: |
|
72 | 73 | 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 |
74 | 75 | .\${{ env.BUILD_SCRIPT }} -VsArch x64 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }}
|
75 | 76 |
|
76 | 77 | - name: build x86
|
77 | 78 | shell: powershell
|
78 | 79 | run: |
|
79 | 80 | 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 |
81 | 82 | .\${{ env.BUILD_SCRIPT }} -VsArch x86 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }}
|
82 | 83 |
|
83 | 84 | - name: build arm64
|
84 | 85 | shell: powershell
|
85 | 86 | run: |
|
86 | 87 | 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 |
88 | 89 | .\${{ env.BUILD_SCRIPT }} -VsArch arm64 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }}
|
89 | 90 |
|
90 | 91 | # install文件夹改名,并使用7z压缩
|
@@ -112,7 +113,7 @@ jobs:
|
112 | 113 | shell: powershell
|
113 | 114 | run: |
|
114 | 115 | 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 |
116 | 117 | .\${{ env.BUILD_SCRIPT }} -VsArch x64 -VsVer ${{ matrix.list.vs_ver }} -VsCRT ${{ matrix.crt }} -BuildJava
|
117 | 118 |
|
118 | 119 | - name: 7zip pack java libs
|
|
0 commit comments