1
- # This file is autogenerated by maturin v1.1.0
1
+ # This file is autogenerated by maturin v1.8.2
2
2
# To update, run
3
3
#
4
- # maturin generate-ci --pytest github
4
+ # maturin generate-ci --pytest --platform all --zig github
5
5
#
6
6
name : CI
7
7
11
11
- main
12
12
- master
13
13
tags :
14
- - ' * '
14
+ - " * "
15
15
pull_request :
16
16
workflow_dispatch :
17
17
@@ -20,73 +20,150 @@ 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
fail-fast : false
26
26
matrix :
27
- # If you update the targets here, be sure to also update the
28
- # download-artifact step in the release job!
29
- target : [ x86_64, aarch64]
30
- # pytensor is currently giving me issues on the other targets...
31
- # target: [x86_64, aarch64, s390x, ppc64le]
27
+ platform :
28
+ - runner : ubuntu-22.04
29
+ target : x86_64
30
+ - runner : ubuntu-22.04
31
+ target : aarch64
32
32
steps :
33
33
- uses : actions/checkout@v4
34
34
- uses : actions/setup-python@v5
35
35
with :
36
- python-version : ' 3.10'
36
+ python-version : " 3.12"
37
+ - name : Install uv
38
+ uses : astral-sh/setup-uv@v5
37
39
- name : Build wheels
38
40
uses : PyO3/maturin-action@v1
39
41
with :
40
- target : ${{ matrix.target }}
41
- args : --release --out dist --find-interpreter
42
- manylinux : 2_28
42
+ target : ${{ matrix.platform.target }}
43
+ args : --release --out dist --find-interpreter --zig
44
+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
45
+ manylinux : auto
43
46
before-script-linux : |
44
- dnf install -y clang-libs clang || apt install llvm-dev libclang-dev clang
45
-
47
+ dnf install -y clang-libs clang || sudo apt install llvm-dev libclang-dev clang
46
48
- name : Upload wheels
47
49
uses : actions/upload-artifact@v4
48
50
with :
49
- name : linux-${{ matrix.target }}-wheels
51
+ name : wheels- linux-${{ matrix.platform. target }}
50
52
path : dist
51
53
- name : pytest
52
- if : ${{ startsWith(matrix.target, 'x86_64') }}
54
+ if : ${{ startsWith(matrix.platform. target, 'x86_64') }}
53
55
shell : bash
54
56
run : |
55
57
set -e
56
- pip install --find-links dist --force-reinstall 'nutpie[all]'
57
- pip install --find-links dist --force-reinstall --no-deps --no-index 'nutpie[all]'
58
- pip install pytest
58
+ python3 -m venv .venv
59
+ source .venv/bin/activate
60
+ uv pip install 'nutpie[all]' --find-links dist --force-reinstall
61
+ uv pip install pytest
59
62
pytest
60
63
- name : pytest
61
- if : ${{ !startsWith(matrix.target, 'x86') }}
62
- uses : uraimo/run-on-arch-action@v2.8.1
64
+ if : ${{ !startsWith(matrix.platform. target, 'x86') && matrix.platform.target != 'ppc64' }}
65
+ uses : uraimo/run-on-arch-action@v2
63
66
with :
64
- arch : ${{ matrix.target }}
65
- distro : fedora_latest
67
+ arch : ${{ matrix.platform. target }}
68
+ distro : ubuntu22.04
66
69
githubToken : ${{ github.token }}
67
70
install : |
68
- dnf install -y python3 python3-pip hdf5-devel python3-devel pkg-config curl @development-tools
69
- pip3 install -U pip pytest
71
+ apt-get update
72
+ apt-get install -y --no-install-recommends python3 python3-pip curl make clang build-essential python3-dev
73
+ curl -LsSf https://astral.sh/uv/install.sh | sh
74
+ source $HOME/.local/bin/env
70
75
run : |
71
76
set -e
72
- pip3 install --find-links dist --force-reinstall 'nutpie[all]'
73
- pip3 install 'nutpie[all]' --find-links dist --no-deps --no-index --force-reinstall
77
+ source $HOME/.local/bin/env
78
+ uv pip install --system -U pip pytest
79
+ uv pip install --system 'nutpie[all]' --find-links dist --force-reinstall
74
80
pytest
75
81
82
+ # pyarrow doesn't currently seem to work on musllinux
83
+ # musllinux:
84
+ # runs-on: ${{ matrix.platform.runner }}
85
+ # strategy:
86
+ # fail-fast: false
87
+ # matrix:
88
+ # platform:
89
+ # - runner: ubuntu-22.04
90
+ # target: x86_64
91
+ # - runner: ubuntu-22.04
92
+ # target: aarch64
93
+ # steps:
94
+ # - uses: actions/checkout@v4
95
+ # - uses: actions/setup-python@v5
96
+ # with:
97
+ # python-version: "3.12"
98
+ # - name: Install uv
99
+ # uses: astral-sh/setup-uv@v5
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: ${{ !startsWith(github.ref, 'refs/tags/') }}
106
+ # manylinux: musllinux_1_2
107
+ # before-script-linux: |
108
+ # dnf install -y clang-libs clang || apt install llvm-dev libclang-dev clang
109
+ # - name: Upload wheels
110
+ # uses: actions/upload-artifact@v4
111
+ # with:
112
+ # name: wheels-musllinux-${{ matrix.platform.target }}
113
+ # path: dist
114
+ # - name: pytest
115
+ # if: ${{ startsWith(matrix.platform.target, 'x86_64') }}
116
+ # uses: addnab/docker-run-action@v3
117
+ # with:
118
+ # image: alpine:latest
119
+ # options: -v ${{ github.workspace }}:/io -w /io
120
+ # run: |
121
+ # set -e
122
+ # apk add py3-pip py3-virtualenv curl make clang
123
+ # curl -LsSf https://astral.sh/uv/install.sh | sh
124
+ # source $HOME/.local/bin/env
125
+ # python3 -m virtualenv .venv
126
+ # source .venv/bin/activate
127
+ # # No numba packages for alpine
128
+ # uv pip install 'nutpie[stan]' --find-links dist --force-reinstall
129
+ # uv pip install pytest
130
+ # pytest
131
+ # - name: pytest
132
+ # if: ${{ !startsWith(matrix.platform.target, 'x86') }}
133
+ # uses: uraimo/run-on-arch-action@v2
134
+ # with:
135
+ # arch: ${{ matrix.platform.target }}
136
+ # distro: alpine_latest
137
+ # githubToken: ${{ github.token }}
138
+ # install: |
139
+ # apk add py3-virtualenv curl make clang
140
+ # curl -LsSf https://astral.sh/uv/install.sh | sh
141
+ # source $HOME/.local/bin/env
142
+ # run: |
143
+ # set -e
144
+ # python3 -m virtualenv .venv
145
+ # source $HOME/.local/bin/env
146
+ # source .venv/bin/activate
147
+ # uv pip install pytest
148
+ # # No numba packages for alpine
149
+ # uv pip install 'nutpie[stan]' --find-links dist --force-reinstall
150
+ # pytest
151
+
76
152
windows :
77
- runs-on : windows-latest
153
+ runs-on : ${{ matrix.platform.runner }}
78
154
strategy :
79
- fail-fast : false
80
155
matrix :
81
- # If you update the targets here, be sure to also update the
82
- # download-artifact step in the release job!
83
- target : [ x64]
156
+ platform :
157
+ - runner : windows-latest
158
+ target : x64
84
159
steps :
85
160
- uses : actions/checkout@v4
86
161
- uses : actions/setup-python@v5
87
162
with :
88
- python-version : ' 3.10'
89
- architecture : ${{ matrix.target }}
163
+ python-version : " 3.12"
164
+ architecture : ${{ matrix.platform.target }}
165
+ - name : Install uv
166
+ uses : astral-sh/setup-uv@v5
90
167
- name : Install LLVM and Clang
91
168
uses : KyleMayes/install-llvm-action@v2
92
169
with :
@@ -101,59 +178,63 @@ jobs:
101
178
env :
102
179
LIBCLANG_PATH : ${{ runner.temp }}/llvm/lib
103
180
with :
104
- target : ${{ matrix.target }}
181
+ target : ${{ matrix.platform. target }}
105
182
args : --release --out dist --find-interpreter
106
- sccache : ' true '
183
+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
107
184
- name : Upload wheels
108
185
uses : actions/upload-artifact@v4
109
186
with :
110
- name : windows-${{ matrix.target }}-wheels
187
+ name : wheels- windows-${{ matrix.platform. target }}
111
188
path : dist
112
189
- name : pytest
113
- if : ${{ !startsWith(matrix.target, 'aarch64') }}
190
+ if : ${{ !startsWith(matrix.platform. target, 'aarch64') }}
114
191
shell : bash
115
192
run : |
116
193
set -e
117
- pip install "nutpie[all]" --find-links dist --force-reinstall
118
- pip install --find-links dist --force-reinstall --no-deps --no-index 'nutpie[all]'
119
- pip install pytest
194
+ python3 -m venv .venv
195
+ source .venv/Scripts/activate
196
+ uv pip install "nutpie[all]" --find-links dist --force-reinstall
197
+ uv pip install pytest
120
198
pytest
121
199
122
200
macos :
123
- runs-on : macos-latest
201
+ runs-on : ${{ matrix.platform.runner }}
124
202
strategy :
125
203
fail-fast : false
126
204
matrix :
127
- # If you update the targets here, be sure to also update the
128
- # download-artifact step in the release job!
129
- target : [x86_64, aarch64]
205
+ platform :
206
+ - runner : macos-13
207
+ target : x86_64
208
+ - runner : macos-14
209
+ target : aarch64
130
210
steps :
131
211
- uses : actions/checkout@v4
132
212
- uses : actions/setup-python@v5
133
213
with :
134
- python-version : ' 3.10'
214
+ python-version : " 3.12"
215
+ - name : Install uv
216
+ uses : astral-sh/setup-uv@v5
135
217
- uses : maxim-lobanov/setup-xcode@v1
136
218
with :
137
219
xcode-version : latest-stable
138
220
- name : Build wheels
139
221
uses : PyO3/maturin-action@v1
140
222
with :
141
- target : ${{ matrix.target }}
223
+ target : ${{ matrix.platform. target }}
142
224
args : --release --out dist --find-interpreter
143
- sccache : ' true '
225
+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
144
226
- name : Upload wheels
145
227
uses : actions/upload-artifact@v4
146
228
with :
147
- name : macos-${{ matrix.target }}-wheels
229
+ name : wheels- macos-${{ matrix.platform. target }}
148
230
path : dist
149
231
- name : pytest
150
- if : ${{ startsWith(matrix.target, 'aarch64') }}
151
- shell : bash
152
232
run : |
153
233
set -e
154
- pip install 'nutpie[all]' --find-links dist --force-reinstall
155
- pip install --find-links dist --force-reinstall --no-deps --no-index 'nutpie[all]'
156
- pip install pytest
234
+ python3 -m venv .venv
235
+ source .venv/bin/activate
236
+ uv pip install 'nutpie[all]' --find-links dist --force-reinstall
237
+ uv pip install pytest
157
238
pytest
158
239
159
240
sdist :
@@ -168,45 +249,38 @@ jobs:
168
249
- name : Upload sdist
169
250
uses : actions/upload-artifact@v4
170
251
with :
171
- name : sdist
252
+ name : wheels- sdist
172
253
path : dist
173
254
174
255
release :
175
256
name : Release
176
257
runs-on : ubuntu-latest
177
- if : " startsWith(github.ref, 'refs/tags/')"
258
+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
178
259
needs : [linux, windows, macos, sdist]
260
+ permissions :
261
+ # Use to sign the release artifacts
262
+ id-token : write
263
+ # Used to upload release artifacts
264
+ contents : write
265
+ # Used to generate artifact attestation
266
+ attestations : write
179
267
steps :
180
- # Combine all the wheels and sdists into a single directory
181
- - name : Download artifacts
182
- uses : actions/download-artifact@v4
183
- with :
184
- name : linux-x86_64-wheels
185
- path : dist
186
- - uses : actions/download-artifact@v4
187
- with :
188
- name : linux-aarch64-wheels
189
- path : dist
190
268
- uses : actions/download-artifact@v4
269
+ - name : Generate artifact attestation
270
+ uses : actions/attest-build-provenance@v1
191
271
with :
192
- name : windows-x64-wheels
193
- path : dist
194
- - uses : actions/download-artifact@v4
195
- with :
196
- name : macos-x86_64-wheels
197
- path : dist
198
- - uses : actions/download-artifact@v4
199
- with :
200
- name : macos-aarch64-wheels
201
- path : dist
202
- - uses : actions/download-artifact@v4
203
- with :
204
- name : sdist
205
- path : dist
272
+ subject-path : " wheels-*/*"
206
273
- name : Publish to PyPI
274
+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
207
275
uses : PyO3/maturin-action@v1
208
276
env :
209
277
MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
210
278
with :
211
279
command : upload
212
- args : --skip-existing dist/*
280
+ args : --non-interactive --skip-existing wheels-*/*
281
+ - name : Upload to GitHub Release
282
+ uses : softprops/action-gh-release@v1
283
+ with :
284
+ files : |
285
+ wasm-wheels/*.whl
286
+ prerelease : ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }}
0 commit comments