Skip to content

Commit 3d9fde2

Browse files
committed
Actions: Go back to VS 17.9
Increase compatability with Windows systems. Signed-off-by: kingbri <[email protected]>
1 parent af04f9a commit 3d9fde2

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.github/workflows/build-wheels-release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ jobs:
164164
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
165165
}
166166
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+
167173
# Install uv for easier python setup
168174
- name: Install the latest version of uv and set the python version
169175
uses: astral-sh/setup-uv@v5
@@ -267,6 +273,13 @@ jobs:
267273
- name: Build for CUDA
268274
if: matrix.cuda != ''
269275
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+
270283
# --- Build wheel
271284
$BUILDTAG = "+cu${{ steps.cuda_deps.outputs.CUDA_VERSION_PYTORCH }}-torch${{ matrix.torch }}"
272285
$env:BUILD_TARGET = "cuda"

.github/workflows/build-wheels-release_torch27_only.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,12 @@ jobs:
164164
Write-Output "PACKAGE_VERSION=None" >> "$env:GITHUB_OUTPUT"
165165
}
166166
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+
167173
# Install uv for easier python setup
168174
- name: Install the latest version of uv and set the python version
169175
uses: astral-sh/setup-uv@v5
@@ -267,6 +273,13 @@ jobs:
267273
- name: Build for CUDA
268274
if: matrix.cuda != ''
269275
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+
270283
# --- Build wheel
271284
$BUILDTAG = "+cu${{ steps.cuda_deps.outputs.CUDA_VERSION_PYTORCH }}-torch${{ matrix.torch }}"
272285
$env:BUILD_TARGET = "cuda"

0 commit comments

Comments
 (0)