Skip to content

Commit 452b4a1

Browse files
committed
ci: Add Linux AArch64 native build
1 parent c0e5452 commit 452b4a1

File tree

2 files changed

+62
-9
lines changed

2 files changed

+62
-9
lines changed

.github/workflows/dist.yml

Lines changed: 60 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,64 @@ jobs:
141141
name: "pypi-${{ runner.os }}-${{ matrix.python_version }}"
142142
path: dist
143143

144+
build-arm:
145+
runs-on: ubuntu-24.04-arm
146+
needs: [setup_concurrency]
147+
strategy:
148+
max-parallel: ${{ fromJSON(needs.setup_concurrency.outputs.max-parallel).v }}
149+
fail-fast: true
150+
matrix:
151+
python_version:
152+
- '3.11'
153+
- '3.12'
154+
- '3.13'
155+
container: python:${{ matrix.python_version }}-bookworm
156+
157+
steps:
158+
- run: apt-get update && apt-get install -y libgl1
159+
160+
- uses: actions/checkout@v4
161+
with:
162+
fetch-depth: 0
163+
164+
#
165+
# Setup build caching
166+
#
167+
168+
- name: Setup sccache
169+
uses: mozilla-actions/[email protected]
170+
171+
# See https://github.com/pypa/setuptools_scm/issues/784
172+
- name: Set git directory as safe to allow setuptools-scm to work
173+
shell: bash
174+
run: |
175+
/usr/bin/git config --global --add safe.directory $PWD
176+
177+
- name: Install deps
178+
shell: bash
179+
run: |
180+
python -m pip --disable-pip-version-check install -r rdev_requirements.txt
181+
182+
- name: Install numpy (needed for stubgen)
183+
shell: bash
184+
run: |
185+
python -m pip --disable-pip-version-check install numpy
186+
187+
- name: Build + test wheels
188+
shell: bash
189+
run: |
190+
./rdev.sh ci run
191+
env:
192+
RPYBUILD_STRIP_LIBPYTHON: "1"
193+
RPYBUILD_CC_LAUNCHER: sccache
194+
SCCACHE_WEBDAV_USERNAME: ${{ secrets.WPI_ARTIFACTORY_USERNAME }}
195+
SCCACHE_WEBDAV_PASSWORD: ${{ secrets.WPI_ARTIFACTORY_TOKEN }}
196+
197+
- uses: actions/upload-artifact@v4
198+
with:
199+
name: "pypi-${{ runner.os }}-arm-${{ matrix.python_version }}"
200+
path: dist
201+
144202
#
145203
# Build roboRIO/raspbian wheels
146204
#
@@ -162,13 +220,6 @@ jobs:
162220
- container: wpilib/raspbian-cross-ubuntu:2025-bookworm-22.04-py313
163221
name: raspbian-py313
164222

165-
- container: wpilib/aarch64-cross-ubuntu:2025-bookworm-22.04-py311
166-
name: raspbian-aarch64-py311
167-
- container: wpilib/aarch64-cross-ubuntu:2025-bookworm-22.04-py312
168-
name: raspbian-aarch64-py312
169-
- container: wpilib/aarch64-cross-ubuntu:2025-bookworm-22.04-py313
170-
name: raspbian-aarch64-py313
171-
172223
container:
173224
image: "${{ matrix.os.container }}"
174225

@@ -228,7 +279,7 @@ jobs:
228279

229280
publish-rpyrepo:
230281
runs-on: ubuntu-latest
231-
needs: [check, build, cross-build]
282+
needs: [check, build, build-arm, cross-build]
232283
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
233284

234285
steps:
@@ -248,7 +299,7 @@ jobs:
248299

249300
publish-pypi:
250301
runs-on: ubuntu-latest
251-
needs: [check, build, cross-build]
302+
needs: [check, build, build-arm, cross-build]
252303
permissions:
253304
id-token: write
254305
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

devtools/subproject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,9 @@ def bdist_wheel(self, *, wheel_path: pathlib.Path, install: bool):
128128

129129
_adjust_wheel_tags = {
130130
# pypi only accepts manylinux wheels, and we know we're compatible
131+
# TODO(davo): use auditwheel to fix the tags instead
131132
"linux_x86_64": "manylinux_2_35_x86_64",
133+
"linux_aarch64": "manylinux_2_36_aarch64",
132134
# needed for compatibility with python compiled with older xcode
133135
"macosx_11_0_x86_64": "macosx_10_16_x86_64",
134136
"macosx_12_0_x86_64": "macosx_10_16_x86_64",

0 commit comments

Comments
 (0)