1- # This file is autogenerated by maturin v1.2.3
2- # To update, run
3- #
4- # maturin generate-ci github
5- #
6- # Edited to incorporate genomicmedlab/software-templates Python template
7- # See also https://www.maturin.rs/distribution#using-pypis-trusted-publishing
81name : Publish Python distribution to PyPI
92
103on :
11- release :
12- types : [created]
4+ push :
5+ branches :
6+ - main
7+ tags :
8+ - ' *'
9+ pull_request :
10+ workflow_dispatch :
1311
1412permissions :
1513 contents : read
1614
1715jobs :
1816 linux :
19- runs-on : ubuntu-latest
17+ runs-on : ${{ matrix.platform.runner }}
2018 strategy :
2119 matrix :
22- target : [x86_64, x86, aarch64, armv7, s390x, ppc64le]
20+ platform :
21+ - runner : ubuntu-22.04
22+ target : x86_64
23+ - runner : ubuntu-22.04
24+ target : x86
25+ - runner : ubuntu-22.04
26+ target : aarch64
27+ - runner : ubuntu-22.04
28+ target : armv7
29+ - runner : ubuntu-22.04
30+ target : s390x
31+ - runner : ubuntu-22.04
32+ target : ppc64le
2333 steps :
2434 - uses : actions/checkout@v4
2535 - uses : actions/setup-python@v5
2636 with :
27- python-version : ' 3.10 '
37+ python-version : 3.x
2838 - name : Build wheels
2939 uses : PyO3/maturin-action@v1
3040 with :
31- target : ${{ matrix.target }}
32- args : --release --out dist --find-interpreter
41+ target : ${{ matrix.platform.target }}
42+ args : --release --out dist --manifest-path rust/Cargo.toml
43+ sccache : ' true'
44+ manylinux : auto
45+ - name : Build free-threaded wheels
46+ uses : PyO3/maturin-action@v1
47+ with :
48+ target : ${{ matrix.platform.target }}
49+ args : --release --out dist --manifest-path rust/Cargo.toml -i python3.13t
3350 sccache : ' true'
3451 manylinux : auto
3552 - name : Upload wheels
3653 uses : actions/upload-artifact@v4
3754 with :
38- name : wheels
55+ name : wheels-linux-${{ matrix.platform.target }}
56+ path : dist
57+
58+ musllinux :
59+ runs-on : ${{ matrix.platform.runner }}
60+ strategy :
61+ matrix :
62+ platform :
63+ - runner : ubuntu-22.04
64+ target : x86_64
65+ - runner : ubuntu-22.04
66+ target : x86
67+ - runner : ubuntu-22.04
68+ target : aarch64
69+ - runner : ubuntu-22.04
70+ target : armv7
71+ steps :
72+ - uses : actions/checkout@v4
73+ - uses : actions/setup-python@v5
74+ with :
75+ python-version : 3.x
76+ - name : Build wheels
77+ uses : PyO3/maturin-action@v1
78+ with :
79+ target : ${{ matrix.platform.target }}
80+ args : --release --out dist --manifest-path rust/Cargo.toml
81+ sccache : ' true'
82+ manylinux : musllinux_1_2
83+ - name : Build free-threaded wheels
84+ uses : PyO3/maturin-action@v1
85+ with :
86+ target : ${{ matrix.platform.target }}
87+ args : --release --out dist --manifest-path rust/Cargo.toml -i python3.13t
88+ sccache : ' true'
89+ manylinux : musllinux_1_2
90+ - name : Upload wheels
91+ uses : actions/upload-artifact@v4
92+ with :
93+ name : wheels-musllinux-${{ matrix.platform.target }}
3994 path : dist
4095
4196 windows :
42- runs-on : windows-latest
97+ runs-on : ${{ matrix.platform.runner }}
4398 strategy :
4499 matrix :
45- target : [x64, x86]
100+ platform :
101+ - runner : windows-latest
102+ target : x64
103+ - runner : windows-latest
104+ target : x86
46105 steps :
47106 - uses : actions/checkout@v4
48107 - uses : actions/setup-python@v5
49108 with :
50- python-version : ' 3.10 '
51- architecture : ${{ matrix.target }}
109+ python-version : 3.x
110+ architecture : ${{ matrix.platform. target }}
52111 - name : Build wheels
53112 uses : PyO3/maturin-action@v1
54113 with :
55- target : ${{ matrix.target }}
56- args : --release --out dist --find-interpreter
114+ target : ${{ matrix.platform.target }}
115+ args : --release --out dist --manifest-path rust/Cargo.toml
116+ sccache : ' true'
117+ - name : Build free-threaded wheels
118+ uses : PyO3/maturin-action@v1
119+ with :
120+ target : ${{ matrix.platform.target }}
121+ args : --release --out dist --manifest-path rust/Cargo.toml -i python3.13t
57122 sccache : ' true'
58123 - name : Upload wheels
59124 uses : actions/upload-artifact@v4
60125 with :
61- name : wheels
126+ name : wheels-windows-${{ matrix.platform.target }}
62127 path : dist
63128
64129 macos :
65- runs-on : macos-latest
130+ runs-on : ${{ matrix.platform.runner }}
66131 strategy :
67132 matrix :
68- target : [x86_64, aarch64]
133+ platform :
134+ - runner : macos-13
135+ target : x86_64
136+ - runner : macos-14
137+ target : aarch64
69138 steps :
70139 - uses : actions/checkout@v4
71140 - uses : actions/setup-python@v5
72141 with :
73- python-version : ' 3.10 '
142+ python-version : 3.x
74143 - name : Build wheels
75144 uses : PyO3/maturin-action@v1
76145 with :
77- target : ${{ matrix.target }}
78- args : --release --out dist --find-interpreter
146+ target : ${{ matrix.platform.target }}
147+ args : --release --out dist --manifest-path rust/Cargo.toml
148+ sccache : ' true'
149+ - name : Build free-threaded wheels
150+ uses : PyO3/maturin-action@v1
151+ with :
152+ target : ${{ matrix.platform.target }}
153+ args : --release --out dist --manifest-path rust/Cargo.toml -i python3.13t
79154 sccache : ' true'
80155 - name : Upload wheels
81156 uses : actions/upload-artifact@v4
82157 with :
83- name : wheels
158+ name : wheels-macos-${{ matrix.platform.target }}
84159 path : dist
85160
86161 sdist :
@@ -91,29 +166,40 @@ jobs:
91166 uses : PyO3/maturin-action@v1
92167 with :
93168 command : sdist
94- args : --out dist
169+ args : --out dist --manifest-path rust/Cargo.toml
95170 - name : Upload sdist
96171 uses : actions/upload-artifact@v4
97172 with :
98- name : wheels
173+ name : wheels-sdist
99174 path : dist
100175
101176 release :
102177 name : Release
103178 runs-on : ubuntu-latest
179+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
180+ needs : [
181+ linux,
182+ musllinux,
183+ windows,
184+ macos,
185+ sdist
186+ ]
104187 environment :
105188 name : pypi
106- url : https://pypi.org/p/agct
189+ url : https://pypi.org/p/vrsix
107190 permissions :
108- id-token : write # IMPORTANT: mandatory for trusted publishing
109- if : " startsWith(github.ref, 'refs/tags/') "
110- needs : [linux, windows, macos, sdist]
191+ id-token : write
192+ contents : write
193+ attestations : write
111194 steps :
112- - uses : actions/download-artifact@v4
195+ - name : Acquire build artifacts from parent jobs
196+ uses : actions/download-artifact@v4
197+ - name : Generate artifact attestation
198+ uses : actions/attest-build-provenance@v1
113199 with :
114- name : wheels
200+ subject-path : ' wheels-*/* '
115201 - name : Publish to PyPI
116202 uses : PyO3/maturin-action@v1
117203 with :
118204 command : upload
119- args : --non-interactive --skip-existing *
205+ args : --non-interactive --skip-existing wheels-*/ *
0 commit comments