1- # This file is autogenerated by maturin v1.9.3
2- # To update, run
3- #
4- # maturin generate-ci github
5- #
61name : CI
72
83on :
94 push :
105 branches :
116 - main
127 - master
13- tags :
14- - ' *'
158 pull_request :
16- workflow_dispatch :
17-
18- permissions :
19- contents : read
209
2110jobs :
2211 test :
23- name : Test (Python ${{ matrix.python-version }})
24- runs-on : ubuntu-latest
12+ name : Test (${{ matrix.os }}, Python ${{ matrix.python-version }})
13+ runs-on : ${{ matrix.os }}
2514 strategy :
2615 matrix :
16+ os : [ubuntu-latest]
2717 python-version : ["3.12"]
2818 steps :
2919 - uses : actions/checkout@v4
@@ -42,171 +32,56 @@ jobs:
4232 key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
4333 - name : Install test dependencies
4434 run : pip install pytest
45- - name : Build and install package
46- uses : PyO3/maturin-action@v1
35+ - name : Debug environment
36+ run : |
37+ python --version
38+ file $(which python) || true # macOS/Windows compatible
39+ uname -a || systeminfo # Platform info
40+ - name : Build wheel
41+ uses : messense/maturin-action@v1
4742 with :
48- command : develop
49- args : --release
43+ manylinux : auto
44+ command : build
45+ args : >-
46+ --release
47+ -o dist
48+ --interpreter python
49+ ${{ matrix.os == 'ubuntu-latest' && '--sdist' || '' }}
50+ - name : List wheels
51+ run : ls -l dist/
52+ - name : Install wheel
53+ run : |
54+ VERSION="${{ matrix.python-version }}"
55+ WHEEL=$(ls dist/*.whl | grep "cp${VERSION//./}-")
56+ echo "Installing wheel: $WHEEL"
57+ pip install "$WHEEL"
5058 - name : Run tests
5159 run : make test
52-
53- linux :
54- runs-on : ${{ matrix.platform.runner }}
55- strategy :
56- matrix :
57- platform :
58- - runner : ubuntu-22.04
59- target : x86_64
60- - runner : ubuntu-22.04
61- target : x86
62- - runner : ubuntu-22.04
63- target : aarch64
64- - runner : ubuntu-22.04
65- target : armv7
66- - runner : ubuntu-22.04
67- target : s390x
68- - runner : ubuntu-22.04
69- target : ppc64le
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 : auto
82- - name : Upload wheels
83- uses : actions/upload-artifact@v4
84- with :
85- name : wheels-linux-${{ matrix.platform.target }}
86- path : dist
87-
88- musllinux :
89- runs-on : ${{ matrix.platform.runner }}
90- strategy :
91- matrix :
92- platform :
93- - runner : ubuntu-22.04
94- target : x86_64
95- - runner : ubuntu-22.04
96- target : x86
97- - runner : ubuntu-22.04
98- target : aarch64
99- - runner : ubuntu-22.04
100- target : armv7
101- steps :
102- - uses : actions/checkout@v4
103- - uses : actions/setup-python@v5
104- with :
105- python-version : 3.x
106- - name : Build wheels
107- uses : PyO3/maturin-action@v1
108- with :
109- target : ${{ matrix.platform.target }}
110- args : --release --out dist --find-interpreter
111- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
112- manylinux : musllinux_1_2
113- - name : Upload wheels
114- uses : actions/upload-artifact@v4
115- with :
116- name : wheels-musllinux-${{ matrix.platform.target }}
117- path : dist
118-
119- windows :
120- runs-on : ${{ matrix.platform.runner }}
121- strategy :
122- matrix :
123- platform :
124- - runner : windows-latest
125- target : x64
126- - runner : windows-latest
127- target : x86
128- steps :
129- - uses : actions/checkout@v4
130- - uses : actions/setup-python@v5
131- with :
132- python-version : 3.x
133- architecture : ${{ matrix.platform.target }}
134- - name : Build wheels
135- uses : PyO3/maturin-action@v1
136- with :
137- target : ${{ matrix.platform.target }}
138- args : --release --out dist --find-interpreter
139- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
14060 - name : Upload wheels
14161 uses : actions/upload-artifact@v4
14262 with :
143- name : wheels-windows-${{ matrix.platform.target }}
144- path : dist
145-
146- macos :
147- runs-on : ${{ matrix.platform.runner }}
148- strategy :
149- matrix :
150- platform :
151- - runner : macos-13
152- target : x86_64
153- - runner : macos-14
154- target : aarch64
155- steps :
156- - uses : actions/checkout@v4
157- - uses : actions/setup-python@v5
158- with :
159- python-version : 3.x
160- - name : Build wheels
161- uses : PyO3/maturin-action@v1
162- with :
163- target : ${{ matrix.platform.target }}
164- args : --release --out dist --find-interpreter
165- sccache : ${{ !startsWith(github.ref, 'refs/tags/') }}
166- - name : Upload wheels
167- uses : actions/upload-artifact@v4
168- with :
169- name : wheels-macos-${{ matrix.platform.target }}
170- path : dist
171-
172- sdist :
173- runs-on : ubuntu-latest
174- steps :
175- - uses : actions/checkout@v4
176- - name : Build sdist
177- uses : PyO3/maturin-action@v1
178- with :
179- command : sdist
180- args : --out dist
181- - name : Upload sdist
182- uses : actions/upload-artifact@v4
183- with :
184- name : wheels-sdist
63+ name : wheels-${{ matrix.os }}-py${{ matrix.python-version }}
18564 path : dist
18665
18766 release :
18867 name : Release
18968 runs-on : ubuntu-latest
190- if : ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
191- needs : [test, linux, musllinux, windows, macos, sdist]
192- permissions :
193- # Use to sign the release artifacts
194- id-token : write
195- # Used to upload release artifacts
196- contents : write
197- # Used to generate artifact attestation
198- attestations : write
69+ if : " startsWith(github.ref, 'refs/tags/')"
70+ needs : [test]
19971 steps :
200- - uses : actions/download-artifact@v4
201- - name : Generate artifact attestation
202- uses : actions/attest-build-provenance@v2
203- with :
204- subject-path : ' wheels-*/*'
72+ - uses : actions/checkout@v4
73+ - name : Download artifacts
74+ uses : actions/download-artifact@v4
75+ with :
76+ path : artifacts
77+ - name : Combine wheels
78+ run : |
79+ mkdir dist
80+ cp artifacts/wheels-*/* dist/
20581 - name : Publish to PyPI
206- if : ${{ startsWith(github.ref, 'refs/tags/') }}
207- uses : PyO3/maturin-action@v1
82+ uses : messense/maturin-action@v1
20883 env :
20984 MATURIN_PYPI_TOKEN : ${{ secrets.PYPI_API_TOKEN }}
21085 with :
21186 command : upload
212- args : --non-interactive -- skip-existing wheels-* /*
87+ args : --skip-existing dist /*
0 commit comments