Skip to content

Commit 41a34c8

Browse files
authored
Merge pull request #214 from igerber/update-wheels-manylinux
Add aarch64 Linux wheel builds
2 parents 1e99c76 + 68b722c commit 41a34c8

File tree

2 files changed

+38
-15
lines changed

2 files changed

+38
-15
lines changed

.github/workflows/publish.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,57 @@ on:
55
types: [published]
66

77
jobs:
8-
# Build wheels on Linux using manylinux container
8+
# Build wheels on Linux using manylinux containers
99
build-linux:
10-
name: Build Linux wheels
11-
runs-on: ubuntu-latest
12-
container: quay.io/pypa/manylinux_2_28_x86_64
10+
name: Build Linux ${{ matrix.arch }} wheels
11+
runs-on: ${{ matrix.runner }}
12+
container: ${{ matrix.container }}
13+
strategy:
14+
matrix:
15+
include:
16+
- arch: x86_64
17+
runner: ubuntu-latest
18+
container: quay.io/pypa/manylinux_2_28_x86_64
19+
artifact: wheels-linux-x86_64
20+
- arch: aarch64
21+
runner: ubuntu-24.04-arm
22+
container: quay.io/pypa/manylinux_2_28_aarch64
23+
artifact: wheels-linux-aarch64
1324
steps:
1425
- uses: actions/checkout@v4
1526

16-
- name: Install dependencies
17-
run: |
18-
dnf install -y openssl-devel perl-IPC-Cmd openblas-devel
19-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
20-
/opt/python/cp312-cp312/bin/pip install maturin
27+
- name: Install system dependencies
28+
run: dnf install -y openssl-devel perl-IPC-Cmd openblas-devel
29+
30+
- name: Install Rust
31+
uses: dtolnay/rust-toolchain@stable
32+
33+
- name: Install maturin
34+
run: /opt/python/cp312-cp312/bin/pip install maturin
2135

2236
- name: Build wheels
2337
run: |
24-
export PATH="$HOME/.cargo/bin:$PATH"
38+
expected=0
2539
for pyver in 39 310 311 312 313; do
2640
pybin="/opt/python/cp${pyver}-cp${pyver}/bin/python"
27-
if [ -f "$pybin" ]; then
28-
/opt/python/cp312-cp312/bin/maturin build --release --out dist -i "$pybin" --features extension-module,openblas
41+
if [ ! -f "$pybin" ]; then
42+
echo "ERROR: Expected Python interpreter not found: $pybin"
43+
exit 1
2944
fi
45+
/opt/python/cp312-cp312/bin/maturin build --release --out dist -i "$pybin" --features extension-module,openblas
46+
expected=$((expected + 1))
3047
done
48+
actual=$(ls dist/*.whl 2>/dev/null | wc -l)
49+
echo "Built $actual wheels (expected $expected)"
50+
if [ "$actual" -ne "$expected" ]; then
51+
echo "ERROR: Expected $expected wheels but found $actual"
52+
exit 1
53+
fi
3154
3255
- name: Upload wheels
3356
uses: actions/upload-artifact@v4
3457
with:
35-
name: wheels-linux-x86_64
58+
name: ${{ matrix.artifact }}
3659
path: dist/*.whl
3760

3861
# Build wheels on macOS ARM64 (native build)

.github/workflows/rust-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
os: [ubuntu-latest, macos-latest, windows-latest]
34+
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
3535

3636
steps:
3737
- uses: actions/checkout@v4
@@ -62,7 +62,7 @@ jobs:
6262
strategy:
6363
fail-fast: false
6464
matrix:
65-
os: [ubuntu-latest, macos-latest, windows-latest]
65+
os: [ubuntu-latest, macos-latest, windows-latest, ubuntu-24.04-arm]
6666
python-version: ['3.11', '3.13']
6767

6868
steps:

0 commit comments

Comments
 (0)