1- name : CI
1+ name : Build & Release
22
33on :
44 push :
55 branches :
66 - main
77 tags :
88 - " *" # Trigger on tag push for release
9+ paths :
10+ - " src/**"
11+ - " Cargo.toml"
12+ - " Cargo.lock"
13+ - " pyproject.toml"
14+ - " polars_iptools/**"
15+ - " tests/**"
16+ - " .github/workflows/publish_to_pypi.yml"
917 pull_request :
18+ paths :
19+ - " src/**"
20+ - " Cargo.toml"
21+ - " Cargo.lock"
22+ - " pyproject.toml"
23+ - " polars_iptools/**"
24+ - " tests/**"
25+ - " .github/workflows/publish_to_pypi.yml"
1026 workflow_dispatch : # Trigger for manual release run
1127
1228concurrency :
@@ -16,9 +32,10 @@ concurrency:
1632permissions :
1733 contents : read # Default read-only permissions
1834
19- # Treat all Rust warnings as errors; skip debug symbols to reduce compile time/memory
2035env :
2136 RUSTFLAGS : " -Dwarnings -C debuginfo=0"
37+ CARGO_INCREMENTAL : 0
38+ PYTHONUTF8 : 1
2239
2340jobs :
2441 # ------------------------------------------------------------------
3855 runs-on : ubuntu-latest
3956
4057 steps :
41- - uses : actions/checkout@v4
58+ - uses : actions/checkout@v6
4259
4360 - name : Set up Rust stable toolchain
4461 uses : dtolnay/rust-toolchain@stable
7996 os : [ubuntu, macos, windows]
8097
8198 steps :
82- - uses : actions/checkout@v4
99+ - uses : actions/checkout@v6
83100
84101 - name : install rust stable
85102 uses : dtolnay/rust-toolchain@stable
@@ -110,7 +127,7 @@ jobs:
110127 # Build Wheels
111128 # ------------------------------------------------------------------
112129 build-linux :
113- name : Build Wheels (${{ matrix.platform.runner }} , ${{ matrix.platform.target }})
130+ name : Build Wheels (linux , ${{ matrix.platform.target }})
114131 if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
115132 needs : [test-python, test-os]
116133 runs-on : ${{ matrix.platform.runner }}
@@ -127,9 +144,9 @@ jobs:
127144 target : armv7
128145
129146 steps :
130- - uses : actions/checkout@v4
147+ - uses : actions/checkout@v6
131148
132- - uses : actions/setup-python@v5
149+ - uses : actions/setup-python@v6
133150 with :
134151 python-version : 3.x
135152
@@ -141,14 +158,20 @@ jobs:
141158 sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
142159 manylinux : auto
143160
161+ - name : Smoke test wheel
162+ if : matrix.platform.target == 'x86_64'
163+ run : |
164+ pip install --force-reinstall --verbose dist/*.whl
165+ python -c 'import polars_iptools'
166+
144167 - name : Upload wheels
145168 uses : actions/upload-artifact@v4
146169 with :
147170 name : wheels-linux-${{ matrix.platform.target }}
148171 path : dist
149172
150173 build-musllinux :
151- name : Build Wheels (${{ matrix.platform.runner }} , ${{ matrix.platform.target }})
174+ name : Build Wheels (musllinux , ${{ matrix.platform.target }})
152175 if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
153176 needs : [test-python, test-os]
154177 runs-on : ${{ matrix.platform.runner }}
@@ -165,9 +188,9 @@ jobs:
165188 target : armv7
166189
167190 steps :
168- - uses : actions/checkout@v4
191+ - uses : actions/checkout@v6
169192
170- - uses : actions/setup-python@v5
193+ - uses : actions/setup-python@v6
171194 with :
172195 python-version : 3.x
173196
@@ -186,7 +209,7 @@ jobs:
186209 path : dist
187210
188211 build-windows :
189- name : Build Wheels (${{ matrix.platform.runner }} , ${{ matrix.platform.target }})
212+ name : Build Wheels (windows , ${{ matrix.platform.target }})
190213 if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
191214 needs : [test-python, test-os]
192215 runs-on : ${{ matrix.platform.runner }}
@@ -201,9 +224,9 @@ jobs:
201224 target : x86
202225
203226 steps :
204- - uses : actions/checkout@v4
227+ - uses : actions/checkout@v6
205228
206- - uses : actions/setup-python@v5
229+ - uses : actions/setup-python@v6
207230 with :
208231 python-version : 3.x
209232 architecture : ${{ matrix.platform.target }}
@@ -215,14 +238,20 @@ jobs:
215238 args : --release --out dist
216239 sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
217240
241+ - name : Smoke test wheel
242+ if : matrix.platform.target == 'x64'
243+ run : |
244+ pip install --force-reinstall --verbose dist/*.whl
245+ python -c 'import polars_iptools'
246+
218247 - name : Upload wheels
219248 uses : actions/upload-artifact@v4
220249 with :
221250 name : wheels-windows-${{ matrix.platform.target }}
222251 path : dist
223252
224253 build-macos :
225- name : Build Wheels (${{ matrix.platform.runner }} , ${{ matrix.platform.target }})
254+ name : Build Wheels (macos , ${{ matrix.platform.target }})
226255 if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
227256 needs : [test-python, test-os]
228257 runs-on : ${{ matrix.platform.runner }}
@@ -231,15 +260,15 @@ jobs:
231260 fail-fast : false
232261 matrix :
233262 platform :
234- - runner : macos-14
263+ - runner : macos-15-intel
235264 target : x86_64
236265 - runner : macos-15
237266 target : aarch64
238267
239268 steps :
240- - uses : actions/checkout@v4
269+ - uses : actions/checkout@v6
241270
242- - uses : actions/setup-python@v5
271+ - uses : actions/setup-python@v6
243272 with :
244273 python-version : 3.x
245274
@@ -250,6 +279,11 @@ jobs:
250279 args : --release --out dist
251280 sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
252281
282+ - name : Smoke test wheel
283+ run : |
284+ pip install --force-reinstall --verbose dist/*.whl
285+ python -c 'import polars_iptools'
286+
253287 - name : Upload wheels
254288 uses : actions/upload-artifact@v4
255289 with :
@@ -264,7 +298,7 @@ jobs:
264298 if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
265299 runs-on : ubuntu-latest
266300 steps :
267- - uses : actions/checkout@v4
301+ - uses : actions/checkout@v6
268302 - name : Build sdist
269303 uses : PyO3/maturin-action@v1
270304 with :
@@ -296,15 +330,15 @@ jobs:
296330 attestations : write
297331 steps :
298332 - uses : actions/download-artifact@v4
333+ with :
334+ path : dist
335+ merge-multiple : true
299336 - name : Generate artifact attestation
300337 uses : actions/attest-build-provenance@v2
301338 with :
302- subject-path : " wheels-* /*"
339+ subject-path : " dist /*"
303340 - name : Publish to PyPI
304341 if : ${{ startsWith(github.ref, 'refs/tags/') }}
305- uses : PyO3/maturin-action@v1
306- env :
307- MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
342+ uses : pypa/gh-action-pypi-publish@release/v1
308343 with :
309- command : upload
310- args : --non-interactive --skip-existing wheels-*/*
344+ skip-existing : true
0 commit comments