Skip to content

Commit b2240ea

Browse files
committed
ci: regenerate maturin workflow (upload-artifact v4)
GitHub fails workflows that still use actions/upload-artifact@v3. Regenerate with maturin 1.9.0: v4 artifacts, musllinux matrix, attested release. Made-with: Cursor
1 parent dfdada9 commit b2240ea

1 file changed

Lines changed: 100 additions & 39 deletions

File tree

.github/workflows/ci.yml

Lines changed: 100 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# This file is autogenerated by maturin v1.4.0
2-
# To update, run
1+
# This file is autogenerated by maturin v1.9.0
2+
# To update, run (from sqlshield-py/)
33
#
4-
# maturin generate-ci github
4+
# maturin generate-ci github -o ../.github/workflows/ci.yml
55
#
66
name: CI
77

@@ -20,101 +20,162 @@ permissions:
2020

2121
jobs:
2222
linux:
23-
runs-on: ubuntu-latest
23+
runs-on: ${{ matrix.platform.runner }}
2424
strategy:
2525
matrix:
26-
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
26+
platform:
27+
- runner: ubuntu-22.04
28+
target: x86_64
29+
- runner: ubuntu-22.04
30+
target: x86
31+
- runner: ubuntu-22.04
32+
target: aarch64
33+
- runner: ubuntu-22.04
34+
target: armv7
35+
- runner: ubuntu-22.04
36+
target: s390x
37+
- runner: ubuntu-22.04
38+
target: ppc64le
2739
steps:
28-
- uses: actions/checkout@v3
29-
- uses: actions/setup-python@v4
40+
- uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
3042
with:
31-
python-version: '3.10'
43+
python-version: 3.x
3244
- name: Build wheels
3345
uses: PyO3/maturin-action@v1
3446
with:
35-
target: ${{ matrix.target }}
47+
target: ${{ matrix.platform.target }}
3648
args: --release --out dist --find-interpreter
37-
sccache: 'true'
49+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
3850
manylinux: auto
3951
- name: Upload wheels
40-
uses: actions/upload-artifact@v3
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: wheels-linux-${{ matrix.platform.target }}
55+
path: dist
56+
57+
musllinux:
58+
runs-on: ${{ matrix.platform.runner }}
59+
strategy:
60+
matrix:
61+
platform:
62+
- runner: ubuntu-22.04
63+
target: x86_64
64+
- runner: ubuntu-22.04
65+
target: x86
66+
- runner: ubuntu-22.04
67+
target: aarch64
68+
- runner: ubuntu-22.04
69+
target: armv7
70+
steps:
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: 3.x
75+
- name: Build wheels
76+
uses: PyO3/maturin-action@v1
77+
with:
78+
target: ${{ matrix.platform.target }}
79+
args: --release --out dist --find-interpreter
80+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
81+
manylinux: musllinux_1_2
82+
- name: Upload wheels
83+
uses: actions/upload-artifact@v4
4184
with:
42-
name: wheels
85+
name: wheels-musllinux-${{ matrix.platform.target }}
4386
path: dist
4487

4588
windows:
46-
runs-on: windows-latest
89+
runs-on: ${{ matrix.platform.runner }}
4790
strategy:
4891
matrix:
49-
target: [x64, x86]
92+
platform:
93+
- runner: windows-latest
94+
target: x64
95+
- runner: windows-latest
96+
target: x86
5097
steps:
51-
- uses: actions/checkout@v3
52-
- uses: actions/setup-python@v4
98+
- uses: actions/checkout@v4
99+
- uses: actions/setup-python@v5
53100
with:
54-
python-version: '3.10'
55-
architecture: ${{ matrix.target }}
101+
python-version: 3.x
102+
architecture: ${{ matrix.platform.target }}
56103
- name: Build wheels
57104
uses: PyO3/maturin-action@v1
58105
with:
59-
target: ${{ matrix.target }}
106+
target: ${{ matrix.platform.target }}
60107
args: --release --out dist --find-interpreter
61-
sccache: 'true'
108+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
62109
- name: Upload wheels
63-
uses: actions/upload-artifact@v3
110+
uses: actions/upload-artifact@v4
64111
with:
65-
name: wheels
112+
name: wheels-windows-${{ matrix.platform.target }}
66113
path: dist
67114

68115
macos:
69-
runs-on: macos-latest
116+
runs-on: ${{ matrix.platform.runner }}
70117
strategy:
71118
matrix:
72-
target: [x86_64, aarch64]
119+
platform:
120+
- runner: macos-13
121+
target: x86_64
122+
- runner: macos-14
123+
target: aarch64
73124
steps:
74-
- uses: actions/checkout@v3
75-
- uses: actions/setup-python@v4
125+
- uses: actions/checkout@v4
126+
- uses: actions/setup-python@v5
76127
with:
77-
python-version: '3.10'
128+
python-version: 3.x
78129
- name: Build wheels
79130
uses: PyO3/maturin-action@v1
80131
with:
81-
target: ${{ matrix.target }}
132+
target: ${{ matrix.platform.target }}
82133
args: --release --out dist --find-interpreter
83-
sccache: 'true'
134+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
84135
- name: Upload wheels
85-
uses: actions/upload-artifact@v3
136+
uses: actions/upload-artifact@v4
86137
with:
87-
name: wheels
138+
name: wheels-macos-${{ matrix.platform.target }}
88139
path: dist
89140

90141
sdist:
91142
runs-on: ubuntu-latest
92143
steps:
93-
- uses: actions/checkout@v3
144+
- uses: actions/checkout@v4
94145
- name: Build sdist
95146
uses: PyO3/maturin-action@v1
96147
with:
97148
command: sdist
98149
args: --out dist
99150
- name: Upload sdist
100-
uses: actions/upload-artifact@v3
151+
uses: actions/upload-artifact@v4
101152
with:
102-
name: wheels
153+
name: wheels-sdist
103154
path: dist
104155

105156
release:
106157
name: Release
107158
runs-on: ubuntu-latest
108-
if: "startsWith(github.ref, 'refs/tags/')"
109-
needs: [linux, windows, macos, sdist]
159+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
160+
needs: [linux, musllinux, windows, macos, sdist]
161+
permissions:
162+
# Use to sign the release artifacts
163+
id-token: write
164+
# Used to upload release artifacts
165+
contents: write
166+
# Used to generate artifact attestation
167+
attestations: write
110168
steps:
111-
- uses: actions/download-artifact@v3
169+
- uses: actions/download-artifact@v4
170+
- name: Generate artifact attestation
171+
uses: actions/attest-build-provenance@v2
112172
with:
113-
name: wheels
173+
subject-path: 'wheels-*/*'
114174
- name: Publish to PyPI
175+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
115176
uses: PyO3/maturin-action@v1
116177
env:
117178
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
118179
with:
119180
command: upload
120-
args: --non-interactive --skip-existing *
181+
args: --non-interactive --skip-existing wheels-*/*

0 commit comments

Comments
 (0)