Skip to content

Commit 4533ec9

Browse files
authored
Merge pull request #10 from ail-project/feat-suffix
feat!: suffix management
2 parents bf29342 + ea92cab commit 4533ec9

File tree

6 files changed

+618
-181
lines changed

6 files changed

+618
-181
lines changed

.github/workflows/maturin.yml

Lines changed: 44 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This file is autogenerated by maturin v1.9.5
1+
# This file is autogenerated by maturin v1.11.5
22
# To update, run
33
#
4-
# maturin generate-ci github --pytest -m python/Cargo.toml -o .github/workflows/pytest.yml
4+
# maturin generate-ci -m python/Cargo.toml --pytest -o .github/workflows/maturin.yml github
55
#
66
# NOTE: this file has been modified to add mypy and force installing the packages from the dist directory
77
#
@@ -39,8 +39,8 @@ jobs:
3939
- runner: ubuntu-22.04
4040
target: ppc64le
4141
steps:
42-
- uses: actions/checkout@v4
43-
- uses: actions/setup-python@v5
42+
- uses: actions/checkout@v6
43+
- uses: actions/setup-python@v6
4444
with:
4545
python-version: 3.x
4646
- name: Build wheels
@@ -51,7 +51,7 @@ jobs:
5151
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
5252
manylinux: auto
5353
- name: Upload wheels
54-
uses: actions/upload-artifact@v4
54+
uses: actions/upload-artifact@v5
5555
with:
5656
name: wheels-linux-${{ matrix.platform.target }}
5757
path: dist
@@ -63,8 +63,8 @@ jobs:
6363
python3 -m venv .venv
6464
source .venv/bin/activate
6565
pip install pyfaup-rs --no-index --find-links dist --force-reinstall
66-
pip install pytest mypy
67-
cd python && pytest && mypy .
66+
pip install pytest
67+
cd python && pytest
6868
- name: pytest
6969
if: ${{ !startsWith(matrix.platform.target, 'x86') && matrix.platform.target != 'ppc64' }}
7070
uses: uraimo/run-on-arch-action@v2
@@ -75,11 +75,11 @@ jobs:
7575
install: |
7676
apt-get update
7777
apt-get install -y --no-install-recommends python3 python3-pip
78-
pip3 install -U pip pytest mypy
78+
pip3 install -U pip pytest
7979
run: |
8080
set -e
8181
pip3 install pyfaup-rs --no-index --find-links dist --force-reinstall
82-
cd python && pytest && mypy .
82+
cd python && pytest
8383
8484
musllinux:
8585
runs-on: ${{ matrix.platform.runner }}
@@ -95,8 +95,8 @@ jobs:
9595
- runner: ubuntu-22.04
9696
target: armv7
9797
steps:
98-
- uses: actions/checkout@v4
99-
- uses: actions/setup-python@v5
98+
- uses: actions/checkout@v6
99+
- uses: actions/setup-python@v6
100100
with:
101101
python-version: 3.x
102102
- name: Build wheels
@@ -107,7 +107,7 @@ jobs:
107107
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
108108
manylinux: musllinux_1_2
109109
- name: Upload wheels
110-
uses: actions/upload-artifact@v4
110+
uses: actions/upload-artifact@v5
111111
with:
112112
name: wheels-musllinux-${{ matrix.platform.target }}
113113
path: dist
@@ -123,8 +123,8 @@ jobs:
123123
python3 -m virtualenv .venv
124124
source .venv/bin/activate
125125
pip install pyfaup-rs --no-index --find-links dist --force-reinstall
126-
pip install pytest mypy
127-
cd python && pytest && mypy .
126+
pip install pytest
127+
cd python && pytest
128128
- name: pytest
129129
if: ${{ !startsWith(matrix.platform.target, 'x86') }}
130130
uses: uraimo/run-on-arch-action@v2
@@ -138,9 +138,9 @@ jobs:
138138
set -e
139139
python3 -m virtualenv .venv
140140
source .venv/bin/activate
141-
pip install pytest mypy
141+
pip install pytest
142142
pip install pyfaup-rs --no-index --find-links dist --force-reinstall
143-
cd python && pytest && mypy .
143+
cd python && pytest
144144
145145
windows:
146146
runs-on: ${{ matrix.platform.runner }}
@@ -149,49 +149,52 @@ jobs:
149149
platform:
150150
- runner: windows-latest
151151
target: x64
152+
python_arch: x64
152153
- runner: windows-latest
153154
target: x86
155+
python_arch: x86
156+
- runner: windows-11-arm
157+
target: aarch64
158+
python_arch: arm64
154159
steps:
155-
- uses: actions/checkout@v4
156-
- uses: actions/setup-python@v5
160+
- uses: actions/checkout@v6
161+
- uses: actions/setup-python@v6
157162
with:
158-
python-version: 3.x
159-
architecture: ${{ matrix.platform.target }}
163+
python-version: 3.13
164+
architecture: ${{ matrix.platform.python_arch }}
160165
- name: Build wheels
161166
uses: PyO3/maturin-action@v1
162167
with:
163168
target: ${{ matrix.platform.target }}
164169
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
165170
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
166-
maturin-version: 1.9.4
167171
- name: Upload wheels
168-
uses: actions/upload-artifact@v4
172+
uses: actions/upload-artifact@v5
169173
with:
170174
name: wheels-windows-${{ matrix.platform.target }}
171175
path: dist
172176
- name: pytest
173-
if: ${{ !startsWith(matrix.platform.target, 'aarch64') }}
174177
shell: bash
175178
run: |
176179
set -e
177180
python3 -m venv .venv
178181
source .venv/Scripts/activate
179182
pip install pyfaup-rs --no-index --find-links dist --force-reinstall
180-
pip install pytest mypy
181-
cd python && pytest && mypy .
183+
pip install pytest
184+
cd python && pytest
182185
183186
macos:
184187
runs-on: ${{ matrix.platform.runner }}
185188
strategy:
186189
matrix:
187190
platform:
188-
- runner: macos-13
191+
- runner: macos-15-intel
189192
target: x86_64
190-
- runner: macos-14
193+
- runner: macos-latest
191194
target: aarch64
192195
steps:
193-
- uses: actions/checkout@v4
194-
- uses: actions/setup-python@v5
196+
- uses: actions/checkout@v6
197+
- uses: actions/setup-python@v6
195198
with:
196199
python-version: 3.x
197200
- name: Build wheels
@@ -201,7 +204,7 @@ jobs:
201204
args: --release --out dist --find-interpreter --manifest-path python/Cargo.toml
202205
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
203206
- name: Upload wheels
204-
uses: actions/upload-artifact@v4
207+
uses: actions/upload-artifact@v5
205208
with:
206209
name: wheels-macos-${{ matrix.platform.target }}
207210
path: dist
@@ -211,30 +214,28 @@ jobs:
211214
python3 -m venv .venv
212215
source .venv/bin/activate
213216
pip install pyfaup-rs --no-index --find-links dist --force-reinstall
214-
pip install pytest mypy
215-
cd python && pytest && mypy .
217+
pip install pytest
218+
cd python && pytest
216219
217220
sdist:
218221
runs-on: ubuntu-latest
219222
steps:
220-
- uses: actions/checkout@v4
223+
- uses: actions/checkout@v6
221224
- name: Build sdist
222225
uses: PyO3/maturin-action@v1
223226
with:
224227
command: sdist
225228
args: --out dist --manifest-path python/Cargo.toml
226229
- name: Upload sdist
227-
uses: actions/upload-artifact@v4
230+
uses: actions/upload-artifact@v5
228231
with:
229232
name: wheels-sdist
230233
path: dist
231234

232235
release:
233236
name: Release
234237
runs-on: ubuntu-latest
235-
# We wanna push python package only when pyfaup-rs is upgraded otherwise
236-
# PyPi will complain the version already exists
237-
if: ${{ startsWith(github.ref, 'refs/tags/pyfaup-rs') || github.event_name == 'workflow_dispatch' }}
238+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
238239
needs: [linux, musllinux, windows, macos, sdist]
239240
permissions:
240241
# Use to sign the release artifacts
@@ -245,14 +246,14 @@ jobs:
245246
attestations: write
246247
environment: release
247248
steps:
248-
- uses: actions/download-artifact@v4
249+
- uses: actions/download-artifact@v6
249250
- name: Generate artifact attestation
250-
uses: actions/attest-build-provenance@v2
251+
uses: actions/attest-build-provenance@v3
251252
with:
252253
subject-path: 'wheels-*/*'
254+
- name: Install uv
255+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
256+
uses: astral-sh/setup-uv@v7
253257
- name: Publish to PyPI
254258
if: ${{ startsWith(github.ref, 'refs/tags/') }}
255-
uses: PyO3/maturin-action@v1
256-
with:
257-
command: upload
258-
args: --non-interactive --skip-existing wheels-*/*
259+
run: uv publish 'wheels-*/*'

0 commit comments

Comments
 (0)