Skip to content

Commit 0995676

Browse files
committed
Initial commit.
0 parents  commit 0995676

File tree

22 files changed

+2800
-0
lines changed

22 files changed

+2800
-0
lines changed

.github/workflows/CI.yml

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# This file is autogenerated by maturin v1.12.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+
- master
13+
tags:
14+
- '*'
15+
pull_request:
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
linux:
23+
runs-on: ${{ matrix.platform.runner }}
24+
strategy:
25+
matrix:
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
39+
steps:
40+
- uses: actions/checkout@v6
41+
- uses: actions/setup-python@v6
42+
with:
43+
python-version: 3.x
44+
- name: Build wheels
45+
uses: PyO3/maturin-action@v1
46+
with:
47+
target: ${{ matrix.platform.target }}
48+
args: --release --out dist --find-interpreter
49+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
50+
manylinux: auto
51+
- name: Upload wheels
52+
uses: actions/upload-artifact@v6
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@v6
72+
- uses: actions/setup-python@v6
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@v6
84+
with:
85+
name: wheels-musllinux-${{ matrix.platform.target }}
86+
path: dist
87+
88+
windows:
89+
runs-on: ${{ matrix.platform.runner }}
90+
strategy:
91+
matrix:
92+
platform:
93+
- runner: windows-latest
94+
target: x64
95+
python_arch: x64
96+
- runner: windows-latest
97+
target: x86
98+
python_arch: x86
99+
- runner: windows-11-arm
100+
target: aarch64
101+
python_arch: arm64
102+
steps:
103+
- uses: actions/checkout@v6
104+
- uses: actions/setup-python@v6
105+
with:
106+
python-version: 3.13
107+
architecture: ${{ matrix.platform.python_arch }}
108+
- name: Build wheels
109+
uses: PyO3/maturin-action@v1
110+
with:
111+
target: ${{ matrix.platform.target }}
112+
args: --release --out dist --find-interpreter
113+
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
114+
- name: Upload wheels
115+
uses: actions/upload-artifact@v6
116+
with:
117+
name: wheels-windows-${{ matrix.platform.target }}
118+
path: dist
119+
120+
macos:
121+
runs-on: ${{ matrix.platform.runner }}
122+
strategy:
123+
matrix:
124+
platform:
125+
- runner: macos-15-intel
126+
target: x86_64
127+
- runner: macos-latest
128+
target: aarch64
129+
steps:
130+
- uses: actions/checkout@v6
131+
- uses: actions/setup-python@v6
132+
with:
133+
python-version: 3.x
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/') }}
140+
- name: Upload wheels
141+
uses: actions/upload-artifact@v6
142+
with:
143+
name: wheels-macos-${{ matrix.platform.target }}
144+
path: dist
145+
146+
sdist:
147+
runs-on: ubuntu-latest
148+
steps:
149+
- uses: actions/checkout@v6
150+
- name: Build sdist
151+
uses: PyO3/maturin-action@v1
152+
with:
153+
command: sdist
154+
args: --out dist
155+
- name: Upload sdist
156+
uses: actions/upload-artifact@v6
157+
with:
158+
name: wheels-sdist
159+
path: dist
160+
161+
release:
162+
name: Release
163+
runs-on: ubuntu-latest
164+
if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
165+
needs: [linux, musllinux, windows, macos, sdist]
166+
permissions:
167+
# Use to sign the release artifacts
168+
id-token: write
169+
# Used to upload release artifacts
170+
contents: write
171+
# Used to generate artifact attestation
172+
attestations: write
173+
steps:
174+
- uses: actions/download-artifact@v7
175+
- name: Generate artifact attestation
176+
uses: actions/attest-build-provenance@v3
177+
with:
178+
subject-path: 'wheels-*/*'
179+
- name: Install uv
180+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
181+
uses: astral-sh/setup-uv@v7
182+
- name: Publish to PyPI
183+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
184+
run: uv publish 'wheels-*/*'
185+
env:
186+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/target
2+
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
.pytest_cache/
6+
*.py[cod]
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
.venv/
14+
env/
15+
bin/
16+
build/
17+
develop-eggs/
18+
dist/
19+
eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
include/
26+
man/
27+
venv/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
32+
# Installer logs
33+
pip-log.txt
34+
pip-delete-this-directory.txt
35+
pip-selfcheck.json
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.cache
42+
nosetests.xml
43+
coverage.xml
44+
45+
# Translations
46+
*.mo
47+
48+
# Mr Developer
49+
.mr.developer.cfg
50+
.project
51+
.pydevproject
52+
53+
# Rope
54+
.ropeproject
55+
56+
# Django stuff:
57+
*.log
58+
*.pot
59+
60+
.DS_Store
61+
62+
# Sphinx documentation
63+
docs/_build/
64+
65+
# PyCharm
66+
.idea/
67+
68+
# VSCode
69+
.vscode/
70+
71+
# Pyenv
72+
.python-version

0 commit comments

Comments
 (0)