1
- # This file is autogenerated by maturin v1.4.0
1
+ # This file is autogenerated by maturin v1.7.8
2
2
# To update, run
3
3
#
4
4
# maturin generate-ci github --pytest -o .github/workflows/CI.yml
@@ -20,40 +20,54 @@ permissions:
20
20
21
21
jobs :
22
22
linux :
23
- runs-on : ubuntu-latest
23
+ runs-on : ${{ matrix.platform.runner }}
24
24
strategy :
25
25
matrix :
26
- target : [x86_64, x86, aarch64, armv7, s390x, ppc64le]
26
+ platform :
27
+ - runner : ubuntu-22.04
28
+ target : x86_64
29
+ - runner : ubuntu-22.04
30
+ target : x86
31
+ - runner : ubuntu-22.04
32
+ target : aarch64
33
+ - runner : ubuntu-22.04
34
+ target : armv7
35
+ - runner : ubuntu-22.04
36
+ target : s390x
37
+ - runner : ubuntu-22.04
38
+ target : ppc64le
27
39
steps :
28
40
- uses : actions/checkout@v4
29
41
- uses : actions/setup-python@v5
30
42
with :
31
- python-version : ' 3.10 '
43
+ python-version : 3.x
32
44
- name : Build wheels
33
45
uses : PyO3/maturin-action@v1
34
46
with :
35
- target : ${{ matrix.target }}
47
+ target : ${{ matrix.platform. target }}
36
48
args : --release --out dist --find-interpreter
37
49
sccache : ' true'
38
50
manylinux : auto
39
51
- name : Upload wheels
40
- uses : actions/upload-artifact@v3
52
+ uses : actions/upload-artifact@v4
41
53
with :
42
- name : wheels
54
+ name : wheels-linux-${{ matrix.platform.target }}
43
55
path : dist
44
56
- name : pytest
45
- if : ${{ startsWith(matrix.target, 'x86_64') }}
57
+ if : ${{ startsWith(matrix.platform. target, 'x86_64') }}
46
58
shell : bash
47
59
run : |
48
60
set -e
49
- pip install pycrc32 --find-links dist --force-reinstall --no-index
61
+ python3 -m venv .venv
62
+ source .venv/bin/activate
63
+ pip install pycrc32 --find-links dist --force-reinstall
50
64
pip install pytest
51
65
pytest
52
66
- name : pytest
53
- if : ${{ !startsWith(matrix.target, 'x86') && matrix.target != 'ppc64' }}
54
- uses : uraimo/run-on-arch-action@v2.7.1
67
+ if : ${{ !startsWith(matrix.platform. target, 'x86') && matrix.platform .target != 'ppc64' }}
68
+ uses : uraimo/run-on-arch-action@v2
55
69
with :
56
- arch : ${{ matrix.target }}
70
+ arch : ${{ matrix.platform. target }}
57
71
distro : ubuntu22.04
58
72
githubToken : ${{ github.token }}
59
73
install : |
@@ -62,67 +76,138 @@ jobs:
62
76
pip3 install -U pip pytest
63
77
run : |
64
78
set -e
65
- pip3 install pycrc32 --find-links dist --force-reinstall --no-index
79
+ pip3 install pycrc32 --find-links dist --force-reinstall
80
+ pytest
81
+
82
+ musllinux :
83
+ runs-on : ${{ matrix.platform.runner }}
84
+ strategy :
85
+ matrix :
86
+ platform :
87
+ - runner : ubuntu-22.04
88
+ target : x86_64
89
+ - runner : ubuntu-22.04
90
+ target : x86
91
+ - runner : ubuntu-22.04
92
+ target : aarch64
93
+ - runner : ubuntu-22.04
94
+ target : armv7
95
+ steps :
96
+ - uses : actions/checkout@v4
97
+ - uses : actions/setup-python@v5
98
+ with :
99
+ python-version : 3.x
100
+ - name : Build wheels
101
+ uses : PyO3/maturin-action@v1
102
+ with :
103
+ target : ${{ matrix.platform.target }}
104
+ args : --release --out dist --find-interpreter
105
+ sccache : ' true'
106
+ manylinux : musllinux_1_2
107
+ - name : Upload wheels
108
+ uses : actions/upload-artifact@v4
109
+ with :
110
+ name : wheels-musllinux-${{ matrix.platform.target }}
111
+ path : dist
112
+ - name : pytest
113
+ if : ${{ startsWith(matrix.platform.target, 'x86_64') }}
114
+ uses : addnab/docker-run-action@v3
115
+ with :
116
+ image : alpine:latest
117
+ options : -v ${{ github.workspace }}:/io -w /io
118
+ run : |
119
+ set -e
120
+ apk add py3-pip py3-virtualenv
121
+ python3 -m virtualenv .venv
122
+ source .venv/bin/activate
123
+ pip install pycrc32 --no-index --find-links dist --force-reinstall
124
+ pip install pytest
125
+ pytest
126
+ - name : pytest
127
+ if : ${{ !startsWith(matrix.platform.target, 'x86') }}
128
+ uses : uraimo/run-on-arch-action@v2
129
+ with :
130
+ arch : ${{ matrix.platform.target }}
131
+ distro : alpine_latest
132
+ githubToken : ${{ github.token }}
133
+ install : |
134
+ apk add py3-virtualenv
135
+ run : |
136
+ set -e
137
+ python3 -m virtualenv .venv
138
+ source .venv/bin/activate
139
+ pip install pytest
140
+ pip install pycrc32 --find-links dist --force-reinstall
66
141
pytest
67
142
68
143
windows :
69
- runs-on : windows-latest
144
+ runs-on : ${{ matrix.platform.runner }}
70
145
strategy :
71
146
matrix :
72
- target : [x64, x86]
147
+ platform :
148
+ - runner : windows-latest
149
+ target : x64
150
+ - runner : windows-latest
151
+ target : x86
73
152
steps :
74
153
- uses : actions/checkout@v4
75
154
- uses : actions/setup-python@v5
76
155
with :
77
- python-version : ' 3.10 '
78
- architecture : ${{ matrix.target }}
156
+ python-version : 3.x
157
+ architecture : ${{ matrix.platform. target }}
79
158
- name : Build wheels
80
159
uses : PyO3/maturin-action@v1
81
160
with :
82
- target : ${{ matrix.target }}
161
+ target : ${{ matrix.platform. target }}
83
162
args : --release --out dist --find-interpreter
84
163
sccache : ' true'
85
164
- name : Upload wheels
86
- uses : actions/upload-artifact@v3
165
+ uses : actions/upload-artifact@v4
87
166
with :
88
- name : wheels
167
+ name : wheels-windows-${{ matrix.platform.target }}
89
168
path : dist
90
169
- name : pytest
91
- if : ${{ !startsWith(matrix.target, 'aarch64') }}
170
+ if : ${{ !startsWith(matrix.platform. target, 'aarch64') }}
92
171
shell : bash
93
172
run : |
94
173
set -e
95
- pip install pycrc32 --find-links dist --force-reinstall --no-index
174
+ python3 -m venv .venv
175
+ source .venv/Scripts/activate
176
+ pip install pycrc32 --find-links dist --force-reinstall
96
177
pip install pytest
97
178
pytest
98
179
99
180
macos :
100
- runs-on : macos-latest
181
+ runs-on : ${{ matrix.platform.runner }}
101
182
strategy :
102
183
matrix :
103
- target : [x86_64, aarch64]
184
+ platform :
185
+ - runner : macos-13
186
+ target : x86_64
187
+ - runner : macos-14
188
+ target : aarch64
104
189
steps :
105
190
- uses : actions/checkout@v4
106
191
- uses : actions/setup-python@v5
107
192
with :
108
- python-version : ' 3.10 '
193
+ python-version : 3.x
109
194
- name : Build wheels
110
195
uses : PyO3/maturin-action@v1
111
196
with :
112
- target : ${{ matrix.target }}
197
+ target : ${{ matrix.platform. target }}
113
198
args : --release --out dist --find-interpreter
114
199
sccache : ' true'
115
200
- name : Upload wheels
116
- uses : actions/upload-artifact@v3
201
+ uses : actions/upload-artifact@v4
117
202
with :
118
- name : wheels
203
+ name : wheels-macos-${{ matrix.platform.target }}
119
204
path : dist
120
205
- name : pytest
121
- if : ${{ !startsWith(matrix.target, 'aarch64') }}
122
- shell : bash
123
206
run : |
124
207
set -e
125
- pip install pycrc32 --find-links dist --force-reinstall --no-index
208
+ python3 -m venv .venv
209
+ source .venv/bin/activate
210
+ pip install pycrc32 --find-links dist --force-reinstall
126
211
pip install pytest
127
212
pytest
128
213
@@ -136,24 +221,34 @@ jobs:
136
221
command : sdist
137
222
args : --out dist
138
223
- name : Upload sdist
139
- uses : actions/upload-artifact@v3
224
+ uses : actions/upload-artifact@v4
140
225
with :
141
- name : wheels
226
+ name : wheels-sdist
142
227
path : dist
143
228
144
229
release :
145
230
name : Release
146
231
runs-on : ubuntu-latest
147
- if : " startsWith(github.ref, 'refs/tags/')"
148
- needs : [linux, windows, macos, sdist]
232
+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
233
+ needs : [linux, musllinux, windows, macos, sdist]
234
+ permissions :
235
+ # Use to sign the release artifacts
236
+ id-token : write
237
+ # Used to upload release artifacts
238
+ contents : write
239
+ # Used to generate artifact attestation
240
+ attestations : write
149
241
steps :
150
- - uses : actions/download-artifact@v3
242
+ - uses : actions/download-artifact@v4
243
+ - name : Generate artifact attestation
244
+ uses : actions/attest-build-provenance@v1
151
245
with :
152
- name : wheels
246
+ subject-path : ' wheels-*/* '
153
247
- name : Publish to PyPI
248
+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
154
249
uses : PyO3/maturin-action@v1
155
250
env :
156
251
MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
157
252
with :
158
253
command : upload
159
- args : --non-interactive --skip-existing *
254
+ args : --non-interactive --skip-existing wheels-*/ *
0 commit comments