Skip to content

Commit 8a31ead

Browse files
Use ARM runners to build for Linux aarch64 (#1539)
* Update python-package.yml * Update python-package.yml * Update python-package.yml * Cleanup * Matrix update --------- Co-authored-by: Matthew Douglas <38992547+matthewdouglas@users.noreply.github.com>
1 parent a764970 commit 8a31ead

File tree

1 file changed

+27
-34
lines changed

1 file changed

+27
-34
lines changed

.github/workflows/python-package.yml

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,15 @@ jobs:
3030
build-shared-libs:
3131
strategy:
3232
matrix:
33-
os:
34-
- ubuntu-22.04 # if you change this, also change the pattern in the build-wheels job to reflect this!
35-
- macos-latest
36-
- windows-latest
37-
arch: [x86_64, aarch64]
38-
exclude:
39-
- os: windows-latest # This probably requires arm64 Windows agents
40-
arch: aarch64
41-
- os: ubuntu-22.04 # Temporary. Takes too long, not ready yet.
33+
include:
34+
- os: ubuntu-22.04
35+
arch: x86_64
36+
- os: ubuntu-22.04-arm
4237
arch: aarch64
38+
- os: windows-latest
39+
arch: x86_64
40+
- os: macos-latest
41+
arch: arm64
4342
runs-on: ${{ matrix.os }}
4443
steps:
4544
- uses: actions/checkout@v4
@@ -64,25 +63,19 @@ jobs:
6463
strategy:
6564
fail-fast: false
6665
matrix:
67-
os:
68-
# NOTE: The CUDA Docker image is hard-coded in the build script, so the Ubuntu version here only affects the runner, not the build environment:
69-
- ubuntu-22.04
70-
- windows-latest
71-
arch: [x86_64, aarch64]
66+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-latest]
67+
include:
68+
- os: ubuntu-22.04
69+
arch: x86_64
70+
- os: ubuntu-22.04-arm
71+
arch: aarch64
72+
- os: windows-latest
73+
arch: x86_64
7274
cuda_version:
7375
["11.8.0", "12.0.1", "12.1.1", "12.2.2", "12.3.2", "12.4.1", "12.5.1", "12.6.3", "12.8.1"]
74-
exclude:
75-
- os: windows-latest # This probably requires arm64 Windows agents
76-
arch: aarch64
77-
- os: ubuntu-22.04 # Temporary. Takes too long, not ready yet.
78-
arch: aarch64
7976
runs-on: ${{ matrix.os }}
8077
steps:
8178
- uses: actions/checkout@v4
82-
# Linux: We use Docker to build cross platform Cuda (aarch64 is built in emulation)
83-
- name: Set up Docker multiarch
84-
if: startsWith(matrix.os, 'ubuntu')
85-
uses: docker/setup-qemu-action@v3
8679
# Windows: We install Cuda on the agent (slow)
8780
- uses: Jimver/cuda-toolkit@v0.2.22
8881
if: startsWith(matrix.os, 'windows')
@@ -115,20 +108,20 @@ jobs:
115108
- build-shared-libs-cuda
116109
strategy:
117110
matrix:
118-
os:
119-
- ubuntu-22.04
120-
- macos-latest
121-
- windows-latest
111+
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-latest, macos-latest]
112+
include:
113+
- os: ubuntu-22.04
114+
arch: x86_64
115+
- os: ubuntu-22.04-arm
116+
arch: aarch64
117+
- os: windows-latest
118+
arch: x86_64
119+
- os: macos-latest
120+
arch: arm64
122121
# The specific Python version is irrelevant in this context as we are only packaging non-C extension
123122
# code. This ensures compatibility across Python versions, including Python 3.9, as compatibility is
124123
# dictated by the packaged code itself, not the Python version used for packaging.
125124
python-version: ["3.10"]
126-
arch: [x86_64, aarch64]
127-
exclude:
128-
- os: windows-latest # This probably requires arm64 Windows agents
129-
arch: aarch64
130-
- os: ubuntu-22.04 # Temporary. Takes too long, not ready yet.
131-
arch: aarch64
132125
runs-on: ${{ matrix.os }}
133126
steps:
134127
- uses: actions/checkout@v4
@@ -193,7 +186,7 @@ jobs:
193186
- name: Inspect wheels directory after renaming files
194187
run: ls -alFR wheels/
195188
- name: Create release and upload artifacts
196-
uses: softprops/action-gh-release@v2.0.8
189+
uses: softprops/action-gh-release@v2.2.1
197190
with:
198191
files: wheels/*.whl
199192
prerelease: true

0 commit comments

Comments
 (0)