7
7
workflow_dispatch :
8
8
9
9
jobs :
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' }})
14
12
strategy :
13
+ fail-fast : false
15
14
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
17
57
58
+ runs-on : ${{ matrix.os }}-latest
18
59
steps :
19
- - uses : actions/checkout@v3
60
+ - uses : actions/checkout@v4
20
61
21
- - name : Set up rust
22
- uses : dtolnay/rust-toolchain@stable
62
+ - name : set up python
63
+ uses : actions/setup-python@v4
23
64
with :
24
- toolchain : stable
65
+ python-version : ' 3.11'
66
+ architecture : ${{ matrix.python-architecture || 'x64' }}
25
67
26
- - name : Setup Rust cache
27
- uses : Swatinem/rust-cache@v2
68
+ - name : build wheels
69
+ uses : PyO3/maturin-action@v1
28
70
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
30
77
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
-
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/
47
79
48
80
- uses : actions/upload-artifact@v3
49
81
with :
50
82
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
59
84
85
+ build_sdist :
86
+ runs-on : ubuntu-latest
60
87
steps :
61
88
- 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
65
91
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
-
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
88
96
with :
89
97
name : dist
90
- path : ./ dist/*
98
+ path : dist
91
99
92
100
93
101
Release :
94
- needs : [ build_wheels, build_wheels_macos_arm ]
102
+ needs : [ build, build_sdist ]
95
103
if : success() && startsWith(github.ref, 'refs/tags/')
96
104
runs-on : ubuntu-latest
97
105
@@ -112,9 +120,6 @@ jobs:
112
120
- name : Update PATH
113
121
run : echo "$HOME/.local/bin" >> $GITHUB_PATH
114
122
115
- - name : Build sdist
116
- run : poetry build --format sdist
117
-
118
123
- name : Check distributions
119
124
run : |
120
125
ls -la dist
0 commit comments