Skip to content

Commit f4959f9

Browse files
authored
Merge pull request #1 from ae-utbm/ci
CI
2 parents 7733b39 + 3910b86 commit f4959f9

1 file changed

Lines changed: 185 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
# This file is autogenerated by maturin v1.14.0
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- master
12+
tags:
13+
- '*'
14+
pull_request:
15+
workflow_dispatch:
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
linux:
22+
runs-on: ${{ matrix.platform.runner }}
23+
strategy:
24+
matrix:
25+
platform:
26+
- runner: ubuntu-24.04
27+
target: x86_64
28+
- runner: ubuntu-24.04
29+
target: x86
30+
- runner: ubuntu-24.04
31+
target: aarch64
32+
- runner: ubuntu-24.04
33+
target: armv7
34+
- runner: ubuntu-24.04
35+
target: s390x
36+
- runner: ubuntu-24.04
37+
target: ppc64le
38+
steps:
39+
- uses: actions/checkout@v6
40+
- uses: actions/setup-python@v6
41+
with:
42+
python-version: "3.x"
43+
- name: Build wheels
44+
uses: PyO3/maturin-action@v1
45+
with:
46+
target: ${{ matrix.platform.target }}
47+
args: --release --out dist --find-interpreter
48+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
49+
manylinux: auto
50+
- name: Upload wheels
51+
uses: actions/upload-artifact@v6
52+
with:
53+
name: wheels-linux-${{ matrix.platform.target }}
54+
path: dist
55+
56+
musllinux:
57+
runs-on: ${{ matrix.platform.runner }}
58+
strategy:
59+
matrix:
60+
platform:
61+
- runner: ubuntu-24.04
62+
target: x86_64
63+
- runner: ubuntu-24.04
64+
target: x86
65+
- runner: ubuntu-24.04
66+
target: aarch64
67+
- runner: ubuntu-24.04
68+
target: armv7
69+
steps:
70+
- uses: actions/checkout@v6
71+
- uses: actions/setup-python@v6
72+
with:
73+
python-version: "3.x"
74+
- name: Build wheels
75+
uses: PyO3/maturin-action@v1
76+
with:
77+
target: ${{ matrix.platform.target }}
78+
args: --release --out dist --find-interpreter
79+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
80+
manylinux: musllinux_1_2
81+
- name: Upload wheels
82+
uses: actions/upload-artifact@v6
83+
with:
84+
name: wheels-musllinux-${{ matrix.platform.target }}
85+
path: dist
86+
87+
windows:
88+
runs-on: ${{ matrix.platform.runner }}
89+
strategy:
90+
matrix:
91+
platform:
92+
- runner: windows-latest
93+
target: x64
94+
python_arch: x64
95+
- runner: windows-latest
96+
target: x86
97+
python_arch: x86
98+
- runner: windows-11-arm
99+
target: aarch64
100+
python_arch: arm64
101+
steps:
102+
- uses: actions/checkout@v6
103+
- uses: actions/setup-python@v6
104+
with:
105+
python-version: "3.12"
106+
architecture: ${{ matrix.platform.python_arch }}
107+
- name: Build wheels
108+
uses: PyO3/maturin-action@v1
109+
with:
110+
target: ${{ matrix.platform.target }}
111+
args: --release --out dist --find-interpreter
112+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
113+
- name: Upload wheels
114+
uses: actions/upload-artifact@v6
115+
with:
116+
name: wheels-windows-${{ matrix.platform.target }}
117+
path: dist
118+
119+
macos:
120+
runs-on: ${{ matrix.platform.runner }}
121+
strategy:
122+
matrix:
123+
platform:
124+
- runner: macos-15-intel
125+
target: x86_64
126+
- runner: macos-latest
127+
target: aarch64
128+
steps:
129+
- uses: actions/checkout@v6
130+
- uses: actions/setup-python@v6
131+
with:
132+
python-version: "3.x"
133+
- name: Build wheels
134+
uses: PyO3/maturin-action@v1
135+
with:
136+
target: ${{ matrix.platform.target }}
137+
args: --release --out dist --find-interpreter
138+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
139+
- name: Upload wheels
140+
uses: actions/upload-artifact@v6
141+
with:
142+
name: wheels-macos-${{ matrix.platform.target }}
143+
path: dist
144+
145+
sdist:
146+
runs-on: ubuntu-latest
147+
steps:
148+
- uses: actions/checkout@v6
149+
- name: Build sdist
150+
uses: PyO3/maturin-action@v1
151+
with:
152+
command: sdist
153+
args: --out dist
154+
- name: Upload sdist
155+
uses: actions/upload-artifact@v6
156+
with:
157+
name: wheels-sdist
158+
path: dist
159+
160+
release:
161+
name: Release
162+
runs-on: ubuntu-latest
163+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
164+
needs: [linux, musllinux, windows, macos, sdist]
165+
permissions:
166+
# Use to sign the release artifacts
167+
id-token: write
168+
# Used to upload release artifacts
169+
contents: write
170+
# Used to generate artifact attestation
171+
attestations: write
172+
steps:
173+
- uses: actions/download-artifact@v7
174+
- name: Generate artifact attestation
175+
uses: actions/attest@v4
176+
with:
177+
subject-path: 'wheels-*/*'
178+
- name: Install uv
179+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
180+
uses: astral-sh/setup-uv@v7
181+
- name: Publish to PyPI
182+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
183+
run: uv publish 'wheels-*/*'
184+
env:
185+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)