Skip to content

Commit 868ed3a

Browse files
committed
ci: fix aarch64 cross-compilation by specifying Python interpreters
The cross-compilation Docker container (manylinux2014-cross:aarch64) doesn't have Python interpreters auto-discoverable like native builds. Maturin failed with "Couldn't find any python interpreters". Fix: explicitly specify Python 3.9-3.13 via -i flags for the aarch64 cross-compilation target.
1 parent 4bbd015 commit 868ed3a

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

.github/workflows/release-please.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,45 @@ jobs:
4242
strategy:
4343
matrix:
4444
include:
45+
# Native builds - maturin auto-discovers Python interpreters
4546
- os: ubuntu-latest
4647
target: x86_64-unknown-linux-gnu
47-
- os: ubuntu-latest
48-
target: aarch64-unknown-linux-gnu
4948
- os: macos-latest
5049
target: x86_64-apple-darwin
5150
- os: macos-latest
5251
target: aarch64-apple-darwin
5352
- os: windows-latest
5453
target: x86_64-pc-windows-msvc
54+
# Cross-compilation - must specify Python versions explicitly
55+
# (cross containers don't have discoverable Python interpreters)
56+
- os: ubuntu-latest
57+
target: aarch64-unknown-linux-gnu
58+
interpreter: -i python3.9 -i python3.10 -i python3.11 -i python3.12 -i python3.13
5559
runs-on: ${{ matrix.os }}
5660
steps:
5761
- uses: actions/checkout@v4
5862
with:
5963
ref: ${{ needs.release-please.outputs.tag_name }}
6064

65+
# Python setup required for native builds (macOS/Windows) to discover interpreters
66+
# Linux uses Docker containers which have Python pre-installed
67+
- name: Set up Python
68+
if: matrix.os != 'ubuntu-latest'
69+
uses: actions/setup-python@v5
70+
with:
71+
python-version: |
72+
3.9
73+
3.10
74+
3.11
75+
3.12
76+
3.13
77+
6178
- uses: PyO3/maturin-action@v1
6279
with:
6380
target: ${{ matrix.target }}
64-
args: --release --out dist
81+
args: --release --out dist ${{ matrix.interpreter }}
6582
manylinux: auto
83+
rust-toolchain: stable
6684

6785
- uses: actions/upload-artifact@v4
6886
with:
@@ -83,6 +101,7 @@ jobs:
83101
with:
84102
command: sdist
85103
args: --out dist
104+
rust-toolchain: stable
86105

87106
- uses: actions/upload-artifact@v4
88107
with:

0 commit comments

Comments
 (0)