@@ -8,26 +8,86 @@ permissions:
88
99jobs :
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
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/*
0 commit comments