77 workflow_dispatch :
88
99jobs :
10-
11- build_wheels :
12- name : Build wheels on ${{ matrix.os }}
13- runs-on : ${{ matrix.os }}-latest
10+ build :
11+ name : Build on ${{ matrix.platform || matrix.os }} (${{ matrix.target }} - ${{ matrix.manylinux || 'auto' }})
1412 strategy :
13+ fail-fast : false
1514 matrix :
16- os : [ ubuntu, windows, macos ]
15+ os : [ubuntu, macos, windows]
16+ target : [x86_64, aarch64]
17+ manylinux : [auto]
18+ include :
19+ - os : ubuntu
20+ platform : linux
21+ - os : windows
22+ ls : dir
23+ interpreter : 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
24+ - os : windows
25+ ls : dir
26+ target : aarch64
27+ interpreter : 3.11 3.12
28+ - os : macos
29+ target : aarch64
30+ interpreter : 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
31+ - os : ubuntu
32+ platform : linux
33+ target : aarch64
34+ # mimalloc not supported on manylinux2014 cross-compile container
35+ extra-build-args : --no-default-features
36+ # musllinux
37+ - os : ubuntu
38+ platform : linux
39+ target : x86_64
40+ manylinux : musllinux_1_1
41+ - os : ubuntu
42+ platform : linux
43+ target : aarch64
44+ manylinux : musllinux_1_1
45+ - os : ubuntu
46+ platform : linux
47+ target : ppc64le
48+ interpreter : 3.7 3.8 3.9 3.10 3.11 3.12
49+ # mimalloc not supported on manylinux2014 cross-compile container
50+ extra-build-args : --no-default-features
51+ - os : ubuntu
52+ platform : linux
53+ target : s390x
54+ interpreter : 3.7 3.8 3.9 3.10 3.11 3.12
55+ # mimalloc not supported on manylinux2014 cross-compile container
56+ extra-build-args : --no-default-features
1757
58+ runs-on : ${{ matrix.os }}-latest
1859 steps :
19- - uses : actions/checkout@v3
60+ - uses : actions/checkout@v4
2061
21- - name : Set up rust
22- uses : dtolnay/rust-toolchain@stable
62+ - name : set up python
63+ uses : actions/setup-python@v4
2364 with :
24- toolchain : stable
65+ python-version : ' 3.11'
66+ architecture : ${{ matrix.python-architecture || 'x64' }}
2567
26- - name : Setup Rust cache
27- uses : Swatinem/rust-cache@v2
68+ - name : build wheels
69+ uses : PyO3/maturin-action@v1
2870 with :
29- key : ${{ matrix.os }}
71+ target : ${{ matrix.target }}
72+ manylinux : ${{ matrix.manylinux || 'auto' }}
73+ container : ${{ matrix.container }}
74+ args : --release --out dist --interpreter ${{ matrix.interpreter || '3.7 3.8 3.9 3.10 3.11 3.12 pypy3.7 pypy3.8 pypy3.9 pypy3.10' }} ${{ matrix.extra-build-args }}
75+ rust-toolchain : stable
76+ docker-options : -e CI
3077
31- - name : Set up QEMU
32- if : runner.os == 'Linux'
33- uses : docker/setup-qemu-action@v2
34- with :
35- platforms : all
36-
37- - name : Build wheels
38- uses : pypa/cibuildwheel@v2.12.1
39- env :
40- CIBW_ARCHS_LINUX : auto aarch64
41- CIBW_ARCHS_MACOS : x86_64
42- CIBW_ARCHS_WINDOWS : AMD64
43- CIBW_PROJECT_REQUIRES_PYTHON : " >=3.8"
44- with :
45- package-dir : .
46- output-dir : dist
78+ - run : ${{ matrix.ls || 'ls -lh' }} dist/
4779
4880 - uses : actions/upload-artifact@v3
4981 with :
5082 name : dist
51- path : ./dist/*
52-
53- build_wheels_macos_arm :
54- name : Build arm64 wheels on ${{ matrix.os }}
55- runs-on : ${{ matrix.os }}
56- strategy :
57- matrix :
58- os : [ macos-12 ]
83+ path : dist
5984
85+ build_sdist :
86+ runs-on : ubuntu-latest
6087 steps :
6188 - uses : actions/checkout@v3
62-
63- - name : Set up rust
64- uses : dtolnay/rust-toolchain@stable
89+ - name : Build sdist
90+ uses : PyO3/maturin-action@v1
6591 with :
66- toolchain : stable
67-
68- - name : Setup Rust cache
69- uses : Swatinem/rust-cache@v2
70- with :
71- key : ${{ matrix.os }}
72-
73- - name : Build wheels
74- uses : pypa/cibuildwheel@v2.12.1
75- env :
76- CIBW_ARCHS_MACOS : arm64
77- CIBW_PROJECT_REQUIRES_PYTHON : " >=3.8"
78- with :
79- package-dir : .
80- output-dir : dist
81-
82- - name : Fix wheel tags
83- run : |
84- python3 -m pip install wheel
85- python3 -m wheel tags --platform-tag macosx_12_0_arm64 dist/*-macosx*.whl --remove
86-
87- - uses : actions/upload-artifact@v3
92+ command : sdist
93+ args : --out dist
94+ - name : Upload sdist
95+ uses : actions/upload-artifact@v3
8896 with :
8997 name : dist
90- path : ./ dist/*
98+ path : dist
9199
92100
93101 Release :
94- needs : [ build_wheels, build_wheels_macos_arm ]
102+ needs : [ build, build_sdist ]
95103 if : success() && startsWith(github.ref, 'refs/tags/')
96104 runs-on : ubuntu-latest
97105
@@ -112,9 +120,6 @@ jobs:
112120 - name : Update PATH
113121 run : echo "$HOME/.local/bin" >> $GITHUB_PATH
114122
115- - name : Build sdist
116- run : poetry build --format sdist
117-
118123 - name : Check distributions
119124 run : |
120125 ls -la dist
0 commit comments