Skip to content

Commit bb1fd33

Browse files
mayeuthenryiii
authored andcommitted
feat: Add support for ubuntu-24.04-arm GHA runner (#2135)
* ci(gha): add tests on ubuntu-24.04-arm * address review comments
1 parent 98a6f3b commit bb1fd33

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
runs-on: ${{ matrix.os }}
3838
strategy:
3939
matrix:
40-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
40+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
4141
python_version: ['3.13']
4242
include:
4343
- os: ubuntu-latest
@@ -89,7 +89,7 @@ jobs:
8989
with:
9090
package-dir: sample_proj
9191
output-dir: wheelhouse_only
92-
only: cp312-${{ runner.os == 'Linux' && 'manylinux_x86_64' || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
92+
only: cp312-${{ runner.os == 'Linux' && (runner.arch == 'ARM64' && 'manylinux_aarch64' || 'manylinux_x86_64') || (runner.os == 'Windows' && 'win_amd64' || 'macosx_x86_64') }}
9393

9494
- name: Create custom configuration file
9595
shell: bash
@@ -124,7 +124,7 @@ jobs:
124124

125125
- name: Test cibuildwheel
126126
run: |
127-
uv run bin/run_tests.py --run-podman
127+
uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
128128
129129
emulated-archs:
130130
name: Get qemu emulated architectures

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Usage
5959

6060
| | Linux | macOS | Windows | Linux ARM | macOS ARM | Windows ARM |
6161
|-----------------|-------|-------|---------|-----------|-----------|-------------|
62-
| GitHub Actions ||||¹ || ✅² |
62+
| GitHub Actions |||| || ✅² |
6363
| Azure Pipelines |||| || ✅² |
6464
| Travis CI || ||| | |
6565
| AppVeyor |||| || ✅² |
@@ -88,7 +88,7 @@ jobs:
8888
runs-on: ${{ matrix.os }}
8989
strategy:
9090
matrix:
91-
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
91+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]
9292

9393
steps:
9494
- uses: actions/checkout@v4

examples/github-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
# macos-13 is an intel runner, macos-14 is apple silicon
20-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
20+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
2121

2222
steps:
2323
- uses: actions/checkout@v4

examples/github-minimal.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
# macos-13 is an intel runner, macos-14 is apple silicon
12-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
12+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
1313

1414
steps:
1515
- uses: actions/checkout@v4

examples/github-with-qemu.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,27 @@ jobs:
99
strategy:
1010
matrix:
1111
# macos-13 is an intel runner, macos-14 is apple silicon
12-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
12+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
1313

1414
steps:
1515
- uses: actions/checkout@v4
1616

1717
- name: Set up QEMU
18-
if: runner.os == 'Linux'
18+
if: runner.os == 'Linux' && runner.arch == 'X64'
1919
uses: docker/setup-qemu-action@v3
2020
with:
2121
platforms: all
2222

2323
- name: Build wheels
2424
uses: pypa/[email protected]
2525
env:
26-
# configure cibuildwheel to build native archs ('auto'), and some
27-
# emulated ones
28-
CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
26+
# configure cibuildwheel on Linux to build native archs ('auto'),
27+
# and to split the remaining architectures between the x86_64 and
28+
# ARM runners
29+
# armv7l can be built without QEMU on GitHub Actions ARM runners but that's
30+
# not the case on all ARM64 hardware hence 'auto armv7l' for native archs
31+
# on the GHA ARM64 runner
32+
CIBW_ARCHS_LINUX: ${{ runner.arch == 'X64' && 'auto ppc64le s390x' || 'auto armv7l' }}
2933

3034
- uses: actions/upload-artifact@v4
3135
with:

0 commit comments

Comments
 (0)