Skip to content

Commit 1718893

Browse files
committed
Initial implementation
0 parents  commit 1718893

File tree

17 files changed

+1465
-0
lines changed

17 files changed

+1465
-0
lines changed

.github/workflows/CI.yml

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
# This file is autogenerated by maturin v1.8.6
2+
# To update, run
3+
#
4+
# maturin generate-ci github
5+
#
6+
name: CI
7+
8+
on:
9+
push:
10+
branches:
11+
- main
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-22.04
27+
target: x86_64
28+
- runner: ubuntu-22.04
29+
target: x86
30+
- runner: ubuntu-22.04
31+
target: aarch64
32+
- runner: ubuntu-22.04
33+
target: armv7
34+
- runner: ubuntu-22.04
35+
target: s390x
36+
- runner: ubuntu-22.04
37+
target: ppc64le
38+
steps:
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-python@v5
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
48+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
49+
manylinux: auto
50+
- name: Build free-threaded wheels
51+
uses: PyO3/maturin-action@v1
52+
with:
53+
target: ${{ matrix.platform.target }}
54+
args: --release --out dist -i python3.13t
55+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
56+
manylinux: auto
57+
- name: Upload wheels
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: wheels-linux-${{ matrix.platform.target }}
61+
path: dist
62+
63+
musllinux:
64+
runs-on: ${{ matrix.platform.runner }}
65+
strategy:
66+
matrix:
67+
platform:
68+
- runner: ubuntu-22.04
69+
target: x86_64
70+
- runner: ubuntu-22.04
71+
target: x86
72+
- runner: ubuntu-22.04
73+
target: aarch64
74+
- runner: ubuntu-22.04
75+
target: armv7
76+
steps:
77+
- uses: actions/checkout@v4
78+
- uses: actions/setup-python@v5
79+
with:
80+
python-version: 3.x
81+
- name: Build wheels
82+
uses: PyO3/maturin-action@v1
83+
with:
84+
target: ${{ matrix.platform.target }}
85+
args: --release --out dist
86+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
87+
manylinux: musllinux_1_2
88+
- name: Build free-threaded wheels
89+
uses: PyO3/maturin-action@v1
90+
with:
91+
target: ${{ matrix.platform.target }}
92+
args: --release --out dist -i python3.13t
93+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
94+
manylinux: musllinux_1_2
95+
- name: Upload wheels
96+
uses: actions/upload-artifact@v4
97+
with:
98+
name: wheels-musllinux-${{ matrix.platform.target }}
99+
path: dist
100+
101+
windows:
102+
runs-on: ${{ matrix.platform.runner }}
103+
strategy:
104+
matrix:
105+
platform:
106+
- runner: windows-latest
107+
target: x64
108+
- runner: windows-latest
109+
target: x86
110+
steps:
111+
- uses: actions/checkout@v4
112+
- uses: actions/setup-python@v5
113+
with:
114+
python-version: 3.x
115+
architecture: ${{ matrix.platform.target }}
116+
- name: Build wheels
117+
uses: PyO3/maturin-action@v1
118+
with:
119+
target: ${{ matrix.platform.target }}
120+
args: --release --out dist
121+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
122+
- name: Build free-threaded wheels
123+
uses: PyO3/maturin-action@v1
124+
with:
125+
target: ${{ matrix.platform.target }}
126+
args: --release --out dist -i python3.13t
127+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
128+
- name: Upload wheels
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: wheels-windows-${{ matrix.platform.target }}
132+
path: dist
133+
134+
macos:
135+
runs-on: ${{ matrix.platform.runner }}
136+
strategy:
137+
matrix:
138+
platform:
139+
- runner: macos-13
140+
target: x86_64
141+
- runner: macos-14
142+
target: aarch64
143+
steps:
144+
- uses: actions/checkout@v4
145+
- uses: actions/setup-python@v5
146+
with:
147+
python-version: 3.x
148+
- name: Build wheels
149+
uses: PyO3/maturin-action@v1
150+
with:
151+
target: ${{ matrix.platform.target }}
152+
args: --release --out dist
153+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
154+
- name: Build free-threaded wheels
155+
uses: PyO3/maturin-action@v1
156+
with:
157+
target: ${{ matrix.platform.target }}
158+
args: --release --out dist -i python3.13t
159+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
160+
- name: Upload wheels
161+
uses: actions/upload-artifact@v4
162+
with:
163+
name: wheels-macos-${{ matrix.platform.target }}
164+
path: dist
165+
166+
sdist:
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@v4
170+
- name: Build sdist
171+
uses: PyO3/maturin-action@v1
172+
with:
173+
command: sdist
174+
args: --out dist
175+
- name: Upload sdist
176+
uses: actions/upload-artifact@v4
177+
with:
178+
name: wheels-sdist
179+
path: dist
180+
181+
release:
182+
name: Release
183+
runs-on: ubuntu-latest
184+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
185+
needs: [linux, musllinux, windows, macos, sdist]
186+
permissions:
187+
# Use to sign the release artifacts
188+
id-token: write
189+
# Used to upload release artifacts
190+
contents: write
191+
# Used to generate artifact attestation
192+
attestations: write
193+
steps:
194+
- uses: actions/download-artifact@v4
195+
- name: Generate artifact attestation
196+
uses: actions/attest-build-provenance@v2
197+
with:
198+
subject-path: 'wheels-*/*'
199+
- name: Publish to PyPI
200+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
201+
uses: PyO3/maturin-action@v1
202+
env:
203+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
204+
with:
205+
command: upload
206+
args: --non-interactive --skip-existing wheels-*/*

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Generated by Cargo
2+
# will have compiled files and executables
3+
debug/
4+
target/
5+
6+
# These are backup files generated by rustfmt
7+
**/*.rs.bk
8+
9+
# MSVC Windows builds of rustc generate these, which store debugging information
10+
*.pdb
11+
12+
# Generated by cargo mutants
13+
# Contains mutation testing data
14+
**/mutants.out*/
15+
16+
# RustRover
17+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
18+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
19+
# and can be added to the global gitignore or merged into this file. For a more nuclear
20+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
21+
.idea/

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

Cargo.lock

Lines changed: 164 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)