Skip to content

Commit 6b68b61

Browse files
authored
Support more python ABIs (#3)
1 parent 8fa7b57 commit 6b68b61

7 files changed

Lines changed: 90 additions & 16 deletions

File tree

.github/workflows/build_wheels.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Build Python Wheels
22

33
on:
44
pull_request:
5-
workflow_dispatch:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
610

711
permissions:
812
contents: read

.github/workflows/checks_rust.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Rust Checks
22

33
on:
44
pull_request:
5-
workflow_dispatch:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
610

711
permissions:
812
contents: read

.github/workflows/python_checks.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Python Checks
22

33
on:
44
pull_request:
5-
workflow_dispatch:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
610

711
permissions:
812
contents: read

.github/workflows/release.yml

Lines changed: 71 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,86 @@ permissions:
88

99
jobs:
1010
build:
11+
name: Build wheels (${{ matrix.platform.id }})
1112
runs-on: ${{ matrix.platform.runner }}
1213
strategy:
14+
fail-fast: false
1315
matrix:
1416
platform:
15-
- runner: ubuntu-22.04
16-
- runner: ubuntu-22.04-arm
17-
- runner: macos-14
17+
# manylinux_2_28 x86_64 (cp310-cp313)
18+
- id: manylinux_2_28-x86_64
19+
runner: ubuntu-22.04
20+
target: x86_64-unknown-linux-gnu
21+
manylinux: "2_28"
22+
maturin_args: >-
23+
--release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi
24+
-i python3.10 -i python3.11 -i python3.12 -i python3.13
25+
26+
# manylinux_2_28 aarch64 (cp310-cp313)
27+
- id: manylinux_2_28-aarch64
28+
runner: ubuntu-22.04
29+
target: aarch64-unknown-linux-gnu
30+
manylinux: "2_28"
31+
maturin_args: >-
32+
--release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi
33+
-i python3.10 -i python3.11 -i python3.12 -i python3.13
34+
35+
# macOS arm64 (cp310)
36+
- id: macos-arm64-cp310
37+
runner: macos-14
38+
target: aarch64-apple-darwin
39+
python: "3.10"
40+
manylinux: ""
41+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
42+
43+
# macOS arm64 (cp311)
44+
- id: macos-arm64-cp311
45+
runner: macos-14
46+
target: aarch64-apple-darwin
47+
python: "3.11"
48+
manylinux: ""
49+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
50+
51+
# macOS arm64 (cp312)
52+
- id: macos-arm64-cp312
53+
runner: macos-14
54+
target: aarch64-apple-darwin
55+
python: "3.12"
56+
manylinux: ""
57+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
58+
59+
# macOS arm64 (cp313)
60+
- id: macos-arm64-cp313
61+
runner: macos-14
62+
target: aarch64-apple-darwin
63+
python: "3.13"
64+
manylinux: ""
65+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
66+
1867
steps:
1968
- uses: actions/checkout@v4
20-
- uses: prefix-dev/setup-pixi@v0.9.1
69+
70+
# Only needed for macOS builds (Linux manylinux builds run inside the container and
71+
# actions/setup-python won't affect those).
72+
- name: Setup Python (macOS only)
73+
if: startsWith(matrix.platform.runner, 'macos')
74+
uses: actions/setup-python@v5
2175
with:
22-
pixi-version: v0.63.2
23-
environments: "py"
76+
python-version: ${{ matrix.platform.python }}
77+
2478
- name: Build wheels
25-
run: pixi run py-build-wheel
79+
uses: PyO3/maturin-action@v1
80+
with:
81+
command: build
82+
target: ${{ matrix.platform.target }}
83+
manylinux: ${{ matrix.platform.manylinux }}
84+
args: ${{ matrix.platform.maturin_args }}
85+
2686
- name: Upload wheels
2787
uses: actions/upload-artifact@v4
2888
with:
29-
name: wheels-${{ matrix.platform.runner }}
30-
path: booster_sdk_py/dist/
89+
name: wheels-${{ matrix.platform.id }}
90+
path: dist/*.whl
3191

3292
publish:
3393
runs-on: ubuntu-22.04
@@ -41,7 +101,9 @@ jobs:
41101
pattern: wheels-*
42102
merge-multiple: true
43103
path: dist/
104+
44105
- name: Install uv
45106
uses: astral-sh/setup-uv@v5
107+
46108
- name: Publish to PyPI
47109
run: uv publish dist/*

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["booster_sdk", "booster_sdk_py"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.1.0-alpha.5"
6+
version = "0.1.0-alpha.6"
77
edition = "2024"
88
authors = ["Team whIRLwind"]
99
license = "MIT OR Apache-2.0"

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ authors = ["Team whIRLwind"]
33
channels = ["conda-forge"]
44
name = "booster-sdk"
55
platforms = ["osx-arm64", "linux-64", "linux-aarch64"]
6-
version = "0.1.0-alpha.4"
6+
version = "0.1.0-alpha.6"
77

88
[environments]
99
py = ["wheel-build", "python-tasks"]

0 commit comments

Comments
 (0)