Skip to content

Commit 6a1f36e

Browse files
committed
Debug wheel building pipelines
1 parent 0d303bd commit 6a1f36e

File tree

2 files changed

+161
-32
lines changed

2 files changed

+161
-32
lines changed

.github/workflows/build_wheels.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: build_wheels.yml
2+
on:
3+
pull_request:
4+
branches:
5+
- '**'
6+
7+
jobs:
8+
build:
9+
name: Build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
10+
environment: release
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu, macos, windows]
15+
target: [x86_64, aarch64]
16+
manylinux: [auto]
17+
include:
18+
- os: ubuntu
19+
platform: linux
20+
- os: windows
21+
ls: dir
22+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14 pypy3.10 pypy3.11
23+
- os: windows
24+
ls: dir
25+
target: aarch64
26+
interpreter: 3.11 3.12 3.13 3.14 pypy3.11
27+
- os: macos
28+
target: aarch64
29+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14 pypy3.10 pypy3.11
30+
- os: ubuntu
31+
platform: linux
32+
target: aarch64
33+
# musllinux
34+
- os: ubuntu
35+
platform: linux
36+
target: x86_64
37+
manylinux: musllinux_1_1
38+
- os: ubuntu
39+
platform: linux
40+
target: aarch64
41+
manylinux: musllinux_1_1
42+
- os: ubuntu
43+
platform: linux
44+
target: ppc64le
45+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
46+
- os: ubuntu
47+
platform: linux
48+
target: s390x
49+
interpreter: 3.9 3.10 3.11 3.12 3.13 3.14
50+
51+
runs-on: ${{ matrix.os }}-latest
52+
steps:
53+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
54+
55+
- name: set up python
56+
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0
57+
with:
58+
python-version: '3.11'
59+
architecture: ${{ matrix.python-architecture || 'x64' }}
60+
61+
- name: build wheels
62+
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
63+
with:
64+
target: ${{ matrix.target }}
65+
manylinux: ${{ matrix.manylinux || 'auto' }}
66+
container: ${{ matrix.container }}
67+
args: --release --out dist --interpreter ${{ matrix.interpreter || '3.9 3.10 3.11 3.12 3.13 3.14 pypy3.10 pypy3.11' }} ${{ matrix.extra-build-args }}
68+
rust-toolchain: stable
69+
docker-options: -e CI
70+
71+
- run: ${{ matrix.ls || 'ls -lh' }} dist/
72+
73+
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
74+
with:
75+
name: dist-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux }}
76+
path: dist
77+
78+
build_sdist:
79+
runs-on: ubuntu-latest
80+
environment: release
81+
steps:
82+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
83+
- name: Build sdist
84+
uses: PyO3/maturin-action@86b9d133d34bc1b40018696f782949dac11bd380 # v1.49.4
85+
with:
86+
command: sdist
87+
args: --out dist
88+
- name: Upload sdist
89+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
90+
with:
91+
name: dist-sdist
92+
path: dist
93+
94+
build_no_ext:
95+
runs-on: ubuntu-latest
96+
environment: release
97+
steps:
98+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
99+
- name: Install and configure Poetry
100+
run: pipx install poetry
101+
- name: Hotswap build backend for Poetry
102+
# Maturin doesn't support building no-extension wheels, so we swap to Poetry for that
103+
run: |
104+
sed -i -e '/^\[build-system\]/,/^\[/{s/^requires = .*/requires = ["poetry-core>=2.0.0,<3.0.0"]/; s/^build-backend = .*/build-backend = "poetry.core.masonry.api"/}' pyproject.toml
105+
- name: Install dependencies
106+
run: poetry install --only main --only test --only typing --only build
107+
- name: Run poetry build
108+
run: poetry build -f wheel
109+
- name: Upload no-ext wheel
110+
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
111+
with:
112+
name: dist-any
113+
path: dist

rust/Cargo.lock

Lines changed: 48 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)