File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -164,6 +164,12 @@ jobs:
164
164
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
165
165
}
166
166
167
+ # Pin VS build tools to 17.9 for wider compat
168
+
169
+ - name : Install VS2022 BuildTools 17.9.7
170
+ run : choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel"
171
+ if : runner.os == 'Windows'
172
+
167
173
# Install uv for easier python setup
168
174
- name : Install the latest version of uv and set the python version
169
175
uses : astral-sh/setup-uv@v5
@@ -267,6 +273,13 @@ jobs:
267
273
- name : Build for CUDA
268
274
if : matrix.cuda != ''
269
275
run : |
276
+ # --- Spawn the VS shell
277
+ if ($IsWindows) {
278
+ Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
279
+ Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
280
+ $env:DISTUTILS_USE_SDK=1
281
+ }
282
+
270
283
# --- Build wheel
271
284
$BUILDTAG = "+cu${{ steps.cuda_deps.outputs.CUDA_VERSION_PYTORCH }}-torch${{ matrix.torch }}"
272
285
$env:BUILD_TARGET = "cuda"
Original file line number Diff line number Diff line change @@ -164,6 +164,12 @@ jobs:
164
164
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
165
165
}
166
166
167
+ # Pin VS build tools to 17.9 for wider compat
168
+
169
+ - name : Install VS2022 BuildTools 17.9.7
170
+ run : choco install -y visualstudio2022buildtools --version=117.9.7.0 --params "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --installChannelUri https://aka.ms/vs/17/release/180911598_-255012421/channel"
171
+ if : runner.os == 'Windows'
172
+
167
173
# Install uv for easier python setup
168
174
- name : Install the latest version of uv and set the python version
169
175
uses : astral-sh/setup-uv@v5
@@ -267,6 +273,13 @@ jobs:
267
273
- name : Build for CUDA
268
274
if : matrix.cuda != ''
269
275
run : |
276
+ # --- Spawn the VS shell
277
+ if ($IsWindows) {
278
+ Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
279
+ Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
280
+ $env:DISTUTILS_USE_SDK=1
281
+ }
282
+
270
283
# --- Build wheel
271
284
$BUILDTAG = "+cu${{ steps.cuda_deps.outputs.CUDA_VERSION_PYTORCH }}-torch${{ matrix.torch }}"
272
285
$env:BUILD_TARGET = "cuda"
You can’t perform that action at this time.
0 commit comments