1-
21name : CI
32
43on :
@@ -16,118 +15,179 @@ permissions:
1615
1716jobs :
1817 test :
19- runs-on : ubuntu-latest
20- steps :
21- - uses : actions/checkout@v3
22- - name : update
23- run : |
24- rustup update
25- rustup component add clippy
26- rustup install nightly
27- - name : lint
28- run : |
29- cargo fmt -- --check
30- cargo clippy -- -D warnings
31- - name : test
32- run : |
33- cargo check
34- cargo test --all
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ - name : update
22+ run : |
23+ rustup update
24+ rustup component add clippy
25+ rustup install nightly
26+ - name : lint
27+ run : |
28+ cargo fmt -- --check
29+ cargo clippy -- -D warnings
30+ - name : test
31+ run : |
32+ cargo check
33+ cargo test --all
3534 linux :
36- runs-on : ubuntu-latest
35+ runs-on : ${{ matrix.platform.runner }}
3736 strategy :
3837 matrix :
39- target : [x86_64, x86, aarch64, armv7, s390x, ppc64le]
38+ platform :
39+ - runner : ubuntu-22.04
40+ target : x86_64
41+ - runner : ubuntu-22.04
42+ target : x86
43+ - runner : ubuntu-22.04
44+ target : aarch64
45+ - runner : ubuntu-22.04
46+ target : armv7
47+ - runner : ubuntu-22.04
48+ target : s390x
49+ - runner : ubuntu-22.04
50+ target : ppc64le
4051 steps :
41- - uses : actions/checkout@v3
42- - uses : actions/setup-python@v4
52+ - uses : actions/checkout@v4
53+ - uses : actions/setup-python@v5
4354 with :
44- python-version : ' 3.10 '
55+ python-version : 3.x
4556 - name : Build wheels
4657 uses : PyO3/maturin-action@v1
4758 with :
48- target : ${{ matrix.target }}
59+ target : ${{ matrix.platform. target }}
4960 args : --release --out dist --find-interpreter
50- sccache : ' true '
61+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
5162 manylinux : auto
5263 - name : Upload wheels
53- uses : actions/upload-artifact@v3
64+ uses : actions/upload-artifact@v4
65+ with :
66+ name : wheels-linux-${{ matrix.platform.target }}
67+ path : dist
68+
69+ musllinux :
70+ runs-on : ${{ matrix.platform.runner }}
71+ strategy :
72+ matrix :
73+ platform :
74+ - runner : ubuntu-22.04
75+ target : x86_64
76+ - runner : ubuntu-22.04
77+ target : x86
78+ - runner : ubuntu-22.04
79+ target : aarch64
80+ - runner : ubuntu-22.04
81+ target : armv7
82+ steps :
83+ - uses : actions/checkout@v4
84+ - uses : actions/setup-python@v5
85+ with :
86+ python-version : 3.x
87+ - name : Build wheels
88+ uses : PyO3/maturin-action@v1
89+ with :
90+ target : ${{ matrix.platform.target }}
91+ args : --release --out dist --find-interpreter
92+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
93+ manylinux : musllinux_1_2
94+ - name : Upload wheels
95+ uses : actions/upload-artifact@v4
5496 with :
55- name : wheels
97+ name : wheels-musllinux-${{ matrix.platform.target }}
5698 path : dist
5799
58100 windows :
59- runs-on : windows-latest
101+ runs-on : ${{ matrix.platform.runner }}
60102 strategy :
61103 matrix :
62- target : [x64, x86]
104+ platform :
105+ - runner : windows-latest
106+ target : x64
107+ - runner : windows-latest
108+ target : x86
63109 steps :
64- - uses : actions/checkout@v3
65- - uses : actions/setup-python@v4
110+ - uses : actions/checkout@v4
111+ - uses : actions/setup-python@v5
66112 with :
67- python-version : ' 3.10 '
68- architecture : ${{ matrix.target }}
113+ python-version : 3.x
114+ architecture : ${{ matrix.platform. target }}
69115 - name : Build wheels
70116 uses : PyO3/maturin-action@v1
71117 with :
72- target : ${{ matrix.target }}
118+ target : ${{ matrix.platform. target }}
73119 args : --release --out dist --find-interpreter
74- sccache : ' true '
120+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
75121 - name : Upload wheels
76- uses : actions/upload-artifact@v3
122+ uses : actions/upload-artifact@v4
77123 with :
78- name : wheels
124+ name : wheels-windows-${{ matrix.platform.target }}
79125 path : dist
80126
81127 macos :
82- runs-on : macos-latest
128+ runs-on : ${{ matrix.platform.runner }}
83129 strategy :
84130 matrix :
85- target : [x86_64, aarch64]
131+ platform :
132+ - runner : macos-13
133+ target : x86_64
134+ - runner : macos-14
135+ target : aarch64
86136 steps :
87- - uses : actions/checkout@v3
88- - uses : actions/setup-python@v4
137+ - uses : actions/checkout@v4
138+ - uses : actions/setup-python@v5
89139 with :
90- python-version : ' 3.10 '
140+ python-version : 3.x
91141 - name : Build wheels
92142 uses : PyO3/maturin-action@v1
93143 with :
94- target : ${{ matrix.target }}
144+ target : ${{ matrix.platform. target }}
95145 args : --release --out dist --find-interpreter
96- sccache : ' true '
146+ sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
97147 - name : Upload wheels
98- uses : actions/upload-artifact@v3
148+ uses : actions/upload-artifact@v4
99149 with :
100- name : wheels
150+ name : wheels-macos-${{ matrix.platform.target }}
101151 path : dist
102152
103153 sdist :
104154 runs-on : ubuntu-latest
105155 steps :
106- - uses : actions/checkout@v3
156+ - uses : actions/checkout@v4
107157 - name : Build sdist
108158 uses : PyO3/maturin-action@v1
109159 with :
110160 command : sdist
111161 args : --out dist
112162 - name : Upload sdist
113- uses : actions/upload-artifact@v3
163+ uses : actions/upload-artifact@v4
114164 with :
115- name : wheels
165+ name : wheels-sdist
116166 path : dist
117167
118168 release :
119169 name : Release
120170 runs-on : ubuntu-latest
121- if : " startsWith(github.ref, 'refs/tags/')"
122- needs : [linux, windows, macos, sdist]
171+ if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
172+ needs : [linux, musllinux, windows, macos, sdist]
173+ permissions :
174+ # Use to sign the release artifacts
175+ id-token : write
176+ # Used to upload release artifacts
177+ contents : write
178+ # Used to generate artifact attestation
179+ attestations : write
123180 steps :
124- - uses : actions/download-artifact@v3
181+ - uses : actions/download-artifact@v4
182+ - name : Generate artifact attestation
183+ uses : actions/attest-build-provenance@v1
125184 with :
126- name : wheels
185+ subject-path : ' wheels-*/* '
127186 - name : Publish to PyPI
187+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
128188 uses : PyO3/maturin-action@v1
129189 env :
130190 MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
131191 with :
132192 command : upload
133- args : --skip-existing *
193+ args : --non-interactive -- skip-existing wheels-*/ *
0 commit comments