@@ -23,9 +23,8 @@ concurrency:
2323
2424jobs :
2525 cargo-fmt :
26- name : " cargo fmt"
26+ name : " cargo fmt (nightly) "
2727 runs-on : ubuntu-latest
28- timeout-minutes : 10
2928 steps :
3029 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3130 with :
@@ -35,14 +34,15 @@ jobs:
3534 run : rustup toolchain install nightly --component rustfmt
3635
3736 - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
37+ if : github.event_name == 'pull_request' && github.run_attempt == 1
3838 with :
39- lookup-only : true
39+ lookup-only : false # zizmor: ignore[cache-poisoning]
40+
4041 - run : cargo fmt-nightly --check
4142
4243 cargo-clippy :
43- name : " cargo clippy"
44+ name : " cargo clippy (nightly) "
4445 runs-on : ubuntu-latest
45- timeout-minutes : 10
4646 steps :
4747 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4848 with :
@@ -52,59 +52,29 @@ jobs:
5252 run : rustup toolchain install nightly --component clippy
5353
5454 - uses : Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
55+ if : github.event_name == 'pull_request' && github.run_attempt == 1
5556 with :
56- lookup-only : true
57- - run : cargo clippy --all-targets
58-
59- zizmor :
60- name : " zizmor"
61- runs-on : ubuntu-latest
62- steps :
63- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
64- with :
65- persist-credentials : false
66-
67- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
68- with :
69- python-version : " 3.14"
70-
71- - name : " Install uv"
72- uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
73- with :
74- enable-cache : ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
57+ lookup-only : false # zizmor: ignore[cache-poisoning]
7558
76- - name : " Install zizmor"
77- run : uv pip install --group zizmor --system
78-
79- - name : " Run zizmor"
80- run : zizmor .github/
59+ - run : cargo clippy --all-targets
8160
82- typos :
83- name : " typos"
61+ tools :
8462 runs-on : ubuntu-latest
85- steps :
86- - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
87- with :
88- persist-credentials : false
8963
90- - uses : actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
91- with :
92- python-version : " 3.14"
64+ strategy :
65+ matrix :
66+ include :
67+ - name : " zizmor"
68+ command : zizmor .github/
9369
94- - name : " Install uv"
95- uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
96- with :
97- enable-cache : ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
70+ - name : " typos"
71+ command : typos --config .typos.toml
9872
99- - name : " Install typos "
100- run : uv pip install --group typos --system
73+ - name : " rumdl "
74+ command : rumdl check .
10175
102- - name : " Run typos"
103- run : typos --config .typos.toml
76+ name : ${{ matrix.name }}
10477
105- rumdl :
106- name : " rumdl"
107- runs-on : ubuntu-latest
10878 steps :
10979 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
11080 with :
@@ -117,13 +87,14 @@ jobs:
11787 - name : " Install uv"
11888 uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
11989 with :
120- enable-cache : ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
90+ # zizmor: ignore[cache-poisoning]
91+ enable-cache : ${{ github.event_name == 'pull_request' }}
12192
122- - name : " Install rumdl "
123- run : uv pip install --group rumdl --system
93+ - name : " Install ${{ matrix.name }} "
94+ run : uv pip install --group ${{ matrix.name }} --system
12495
125- - name : " Run rumdl "
126- run : rumdl check .
96+ - name : " Run ${{ matrix.name }} "
97+ run : ${{ matrix.command }}
12798
12899 tests :
129100 uses : ./.github/workflows/tests.yaml
@@ -139,7 +110,8 @@ jobs:
139110 - name : " Install uv"
140111 uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
141112 with :
142- enable-cache : ${{ !startsWith(github.ref, 'refs/tags/') }} # zizmor: ignore[cache-poisoning]
113+ # zizmor: ignore[cache-poisoning]
114+ enable-cache : ${{ github.event_name == 'pull_request' }}
143115
144116 - uses : actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 # zizmor: ignore[cache-poisoning]
145117 with :
@@ -150,23 +122,23 @@ jobs:
150122 run : bash .github/scripts/15-bit.sh
151123
152124 linux :
153- needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, zizmor, typos, rumdl ]
125+ needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, tools ]
154126 uses : ./.github/workflows/linux.yaml
155127
156128 musllinux :
157- needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, zizmor, typos, rumdl ]
129+ needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, tools ]
158130 uses : ./.github/workflows/musllinux.yaml
159131
160132 windows :
161- needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, zizmor, typos, rumdl ]
133+ needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, tools ]
162134 uses : ./.github/workflows/windows.yaml
163135
164136 macos :
165- needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, zizmor, typos, rumdl ]
137+ needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, tools ]
166138 uses : ./.github/workflows/macos.yaml
167139
168140 wasm :
169- needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, zizmor, typos, rumdl ]
141+ needs : [ tests, tests-15-bit-python, cargo-fmt, cargo-clippy, tools ]
170142 uses : ./.github/workflows/wasm.yaml
171143
172144 build-sdist :
@@ -182,7 +154,6 @@ jobs:
182154 with :
183155 command : sdist
184156 args : --out dist
185- rust-toolchain : nightly
186157
187158 - name : " Upload sdist"
188159 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -193,7 +164,7 @@ jobs:
193164 release :
194165 name : " Release"
195166 runs-on : ubuntu-latest
196- if : ${{ startsWith( github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
167+ if : ${{ github.ref_type == 'tag' || github.event_name == 'workflow_dispatch' }}
197168 environment : pypi
198169 needs : [
199170 build-sdist,
@@ -219,32 +190,24 @@ jobs:
219190 subject-path : " wheels-*/*"
220191
221192 - name : " Install uv"
222- if : ${{ startsWith( github.ref, 'refs/tags/') }}
193+ if : ${{ github.ref_type == 'tag' }}
223194 uses : astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
224195 with :
225196 enable-cache : false
226197
227198 - name : " Publish to PyPI"
228- if : ${{ startsWith( github.ref, 'refs/tags/') }}
199+ if : ${{ github.ref_type == 'tag' }}
229200 run : uv publish 'wheels-*/*'
230201 env :
231202 UV_PUBLISH_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
232203
233- - name : " Download wasm artifacts"
234- if : ${{ startsWith(github.ref, 'refs/tags/') }}
235- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
236- with :
237- pattern : wasm-wheels-*
238- merge-multiple : true
239- path : wasm
240-
241204 - name : " Upload wasm wheels to GitHub Release"
242- if : ${{ startsWith( github.ref, 'refs/tags/') }}
205+ if : ${{ github.ref_type == 'tag' }}
243206 run : |
244207 tag="${GITHUB_REF#refs/tags/}"
245208 gh release view "$tag" >/dev/null 2>&1 || \
246209 gh release create "$tag" --title "$tag" --notes ""
247- gh release upload "$tag" wasm/*.whl --clobber
210+ gh release upload "$tag" wheels- wasm-* /*.whl --clobber
248211 env :
249212 GH_REPO : ${{ github.repository }}
250213 GH_TOKEN : ${{ github.token }}
0 commit comments