1- # This file is autogenerated by maturin v0.14.17
1+ # This file is autogenerated by maturin v1.8.3
22# To update, run
33#
44# maturin generate-ci github
55#
6- name : Package & Distribute
6+ name : CI
77
88on :
99 push :
@@ -12,117 +12,133 @@ on:
1212 tags :
1313 - ' *'
1414
15- env :
16- UNIX_PYTHON_VERSIONS : 3.9 3.10 3.11 3.12 3.13 pypy3.10
17- WINDOWS_PYTHON_VERSIONS : 3.9 3.10 3.11 3.12 3.13
18-
1915permissions :
2016 contents : read
2117
2218jobs :
2319 linux :
24- runs-on : ubuntu-latest
20+ runs-on : ${{ matrix.platform.runner }}
2521 strategy :
2622 matrix :
27- target : [x86_64, x86, aarch64, armv7, s390x, ppc64le]
23+ platform :
24+ - runner : ubuntu-22.04
25+ target : x86_64
26+ - runner : ubuntu-22.04
27+ target : x86
28+ - runner : ubuntu-22.04
29+ target : aarch64
30+ - runner : ubuntu-22.04
31+ target : armv7
32+ - runner : ubuntu-22.04
33+ target : s390x
34+ - runner : ubuntu-22.04
35+ target : ppc64le
2836 steps :
29- - uses : actions/checkout@v3
30- - uses : actions/setup-python@v4
37+ - uses : actions/checkout@v4
38+ - uses : actions/setup-python@v5
3139 with :
32- python-version : ' 3.13 '
40+ python-version : 3.x
3341 - name : Build wheels
3442 uses : PyO3/maturin-action@v1
3543 with :
36- target : ${{ matrix.target }}
37- args : --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }}
38- sccache : ' true '
44+ target : ${{ matrix.platform. target }}
45+ args : --release --out dist --find- interpreter
46+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
3947 manylinux : auto
4048 - name : Upload wheels
4149 uses : actions/upload-artifact@v4
4250 with :
43- name : wheels-linux-${{ matrix.target }}
51+ name : wheels-linux-${{ matrix.platform. target }}
4452 path : dist
4553
46- linux-musl :
47- runs-on : ubuntu-latest
54+ musllinux :
55+ runs-on : ${{ matrix.platform.runner }}
4856 strategy :
4957 matrix :
50- platform : [
51- { target: "x86_64-unknown-linux-musl", image_tag: "x86_64-musl" },
52- { target: "i686-unknown-linux-musl", image_tag: "i686-musl" },
53- { target: "aarch64-unknown-linux-musl", image_tag: "aarch64-musl" },
54- { target: "armv7-unknown-linux-musleabihf", image_tag: "armv7-musleabihf" },
55- { target: "powerpc64le-unknown-linux-musl", image_tag: "powerpc64le-musl" },
56- ]
57- container :
58- image : docker://messense/rust-musl-cross:${{ matrix.platform.image_tag }}
59- env :
60- CFLAGS_armv7_unknown_linux_musleabihf : ' -mfpu=vfpv3-d16'
58+ platform :
59+ - runner : ubuntu-22.04
60+ target : x86_64
61+ - runner : ubuntu-22.04
62+ target : x86
63+ - runner : ubuntu-22.04
64+ target : aarch64
65+ - runner : ubuntu-22.04
66+ target : armv7
6167 steps :
62- - uses : actions/checkout@v3
63- - name : Build wheels - linux-musl
68+ - uses : actions/checkout@v4
69+ - uses : actions/setup-python@v5
70+ with :
71+ python-version : 3.x
72+ - name : Build wheels
6473 uses : PyO3/maturin-action@v1
6574 with :
6675 target : ${{ matrix.platform.target }}
67- args : --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }}
68- sccache : ' true'
69- manylinux : musllinux_1_1
70- container : off
76+ args : --release --out dist --find-interpreter
77+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
78+ manylinux : musllinux_1_2
7179 - name : Upload wheels
7280 uses : actions/upload-artifact@v4
7381 with :
74- name : wheels-musl -${{ matrix.platform.target }}
82+ name : wheels-musllinux -${{ matrix.platform.target }}
7583 path : dist
7684
7785 windows :
78- runs-on : windows-latest
86+ runs-on : ${{ matrix.platform.runner }}
7987 strategy :
8088 matrix :
81- target : [x64, x86]
89+ platform :
90+ - runner : windows-latest
91+ target : x64
92+ - runner : windows-latest
93+ target : x86
8294 steps :
83- - uses : actions/checkout@v3
84- - uses : actions/setup-python@v4
95+ - uses : actions/checkout@v4
96+ - uses : actions/setup-python@v5
8597 with :
86- python-version : ' 3.13 '
87- architecture : ${{ matrix.target }}
98+ python-version : 3.x
99+ architecture : ${{ matrix.platform. target }}
88100 - name : Build wheels
89101 uses : PyO3/maturin-action@v1
90102 with :
91- target : ${{ matrix.target }}
92- args : --release --out dist --interpreter ${{ env.WINDOWS_PYTHON_VERSIONS }}
93- sccache : ' true '
103+ target : ${{ matrix.platform. target }}
104+ args : --release --out dist --find- interpreter
105+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
94106 - name : Upload wheels
95107 uses : actions/upload-artifact@v4
96108 with :
97- name : wheels-windows-${{ matrix.target }}
109+ name : wheels-windows-${{ matrix.platform. target }}
98110 path : dist
99111
100112 macos :
101- runs-on : macos-latest
113+ runs-on : ${{ matrix.platform.runner }}
102114 strategy :
103115 matrix :
104- target : [x86_64, aarch64]
116+ platform :
117+ - runner : macos-13
118+ target : x86_64
119+ - runner : macos-14
120+ target : aarch64
105121 steps :
106- - uses : actions/checkout@v3
107- - uses : actions/setup-python@v4
122+ - uses : actions/checkout@v4
123+ - uses : actions/setup-python@v5
108124 with :
109- python-version : ' 3.13 '
125+ python-version : 3.x
110126 - name : Build wheels
111127 uses : PyO3/maturin-action@v1
112128 with :
113- target : ${{ matrix.target }}
114- args : --release --out dist --interpreter ${{ env.UNIX_PYTHON_VERSIONS }}
115- sccache : ' true '
129+ target : ${{ matrix.platform. target }}
130+ args : --release --out dist --find- interpreter
131+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
116132 - name : Upload wheels
117133 uses : actions/upload-artifact@v4
118134 with :
119- name : wheels-macos-${{ matrix.target }}
135+ name : wheels-macos-${{ matrix.platform. target }}
120136 path : dist
121137
122138 sdist :
123139 runs-on : ubuntu-latest
124140 steps :
125- - uses : actions/checkout@v3
141+ - uses : actions/checkout@v4
126142 - name : Build sdist
127143 uses : PyO3/maturin-action@v1
128144 with :
@@ -134,27 +150,29 @@ jobs:
134150 name : wheels-sdist
135151 path : dist
136152
137- merge :
138- runs-on : ubuntu-latest
139- needs : [linux, linux-musl, windows, macos, sdist]
140- steps :
141- - name : Merge Artifacts
142- uses : actions/upload-artifact/merge@v4
143- with :
144- name : wheels
145- pattern : wheels-*
146-
147153 release :
148154 name : Release
149155 runs-on : ubuntu-latest
150- if : " startsWith(github.ref, 'refs/tags/')"
151- needs : merge
156+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
157+ needs : [linux, musllinux, windows, macos, sdist]
158+ permissions :
159+ # Use to sign the release artifacts
160+ id-token : write
161+ # Used to upload release artifacts
162+ contents : write
163+ # Used to generate artifact attestation
164+ attestations : write
152165 steps :
153166 - uses : actions/download-artifact@v4
167+ - name : Generate artifact attestation
168+ uses : actions/attest-build-provenance@v2
169+ with :
170+ subject-path : ' wheels-*/*'
154171 - name : Publish to PyPI
172+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
155173 uses : PyO3/maturin-action@v1
156174 env :
157175 MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
158176 with :
159177 command : upload
160- args : --skip-existing wheels/*
178+ args : --non-interactive -- skip-existing wheels-* /*
0 commit comments