Skip to content

Commit 3aaba9d

Browse files
committed
Revert "Actions: Add fixes for Windows-latest actions and python 3.12"
This reverts commit c3cc17e.
1 parent b8ff197 commit 3aaba9d

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

.github/workflows/build-wheels.yml

+8-17
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ permissions:
2222
jobs:
2323
build_wheels:
2424
name: Build wheels for Python ${{ matrix.pyver }}, CUDA ${{ matrix.cuda }}, and Torch ${{ matrix.torchver }}
25-
runs-on: windows-2022
25+
runs-on: windows-latest
2626
strategy:
2727
matrix:
2828
pyver: ["3.10", "3.11"]
2929
cuda: ["12.2.2"]
30-
torchver: ["2.2.2", "2.3.1"]
30+
torchver: ["2.2.2", "2.3.0"]
3131
defaults:
3232
run:
3333
shell: pwsh
@@ -44,10 +44,6 @@ jobs:
4444
with:
4545
python-version: ${{ matrix.pyver }}
4646

47-
- name: Install VS2022 BuildTools 17.9.7
48-
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"
49-
if: runner.os == 'Windows'
50-
5147
- name: Setup Mamba
5248
uses: conda-incubator/setup-miniconda@v2.2.0
5349
with:
@@ -61,10 +57,12 @@ jobs:
6157

6258
- name: Install Dependencies
6359
run: |
64-
$cudaVersion = '${{ matrix.cuda }}'
65-
$cudaVersionPytorch = '${{ matrix.cuda }}'.Remove('${{ matrix.cuda }}'.LastIndexOf('.')).Replace('.','')
66-
67-
mamba install -y -c nvidia/label/cuda-$cudaVersion cuda-toolkit cuda-runtime
60+
$cudaVersion = $env:CUDAVER
61+
$cudaVersionPytorch = $env:CUDAVER.Remove($env:CUDAVER.LastIndexOf('.')).Replace('.','')
62+
$cudaChannels = ''
63+
$cudaNum = [int]$cudaVersion.substring($cudaVersion.LastIndexOf('.')+1)
64+
while ($cudaNum -ge 0) { $cudaChannels += '-c nvidia/label/cuda-' + $cudaVersion.Remove($cudaVersion.LastIndexOf('.')+1) + $cudaNum + ' '; $cudaNum-- }
65+
mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()
6866
if (!(mamba list cuda)[-1].contains('cuda')) {sleep -s 10; mamba install -y 'cuda' $cudaChannels.TrimEnd().Split()}
6967
if (!(mamba list cuda)[-1].contains('cuda')) {throw 'CUDA Toolkit failed to install!'}
7068
@@ -73,13 +71,6 @@ jobs:
7371
- name: Build Wheel
7472
id: build-wheel
7573
run: |
76-
# --- Spawn the VS shell
77-
if ($IsWindows) {
78-
Import-Module 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\Tools\Microsoft.VisualStudio.DevShell.dll'
79-
Enter-VsDevShell -VsInstallPath 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools' -DevCmdArguments '-arch=x64 -host_arch=x64'
80-
$env:DISTUTILS_USE_SDK=1
81-
}
82-
8374
$cudaVersion = $env:CUDAVER.Remove($env:CUDAVER.LastIndexOf('.')).Replace('.','')
8475
$packageVersion = $env:PCKGVER.TrimStart('v')
8576

0 commit comments

Comments
 (0)