Skip to content

Commit 827c967

Browse files
committed
Initial commit
0 parents  commit 827c967

File tree

11 files changed

+2086
-0
lines changed

11 files changed

+2086
-0
lines changed

.github/workflows/CI.yml

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v*
9+
pull_request:
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
linux:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
target: [x86_64]
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: actions/setup-python@v4
24+
with:
25+
python-version: '3.10'
26+
- name: Build wheels
27+
uses: PyO3/maturin-action@v1
28+
with:
29+
target: ${{ matrix.target }}
30+
args: --release --out dist --find-interpreter
31+
sccache: 'true'
32+
manylinux: auto
33+
- name: Upload wheels
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: wheels
37+
path: dist
38+
39+
macos:
40+
runs-on: macos-arm64
41+
strategy:
42+
matrix:
43+
target: [aarch64]
44+
steps:
45+
- uses: actions/checkout@v3
46+
- uses: actions/setup-python@v4
47+
with:
48+
python-version: '3.10'
49+
- name: Build wheels
50+
uses: PyO3/maturin-action@v1
51+
with:
52+
target: ${{ matrix.target }}
53+
args: --release --out dist --find-interpreter
54+
sccache: 'true'
55+
- name: Upload wheels
56+
uses: actions/upload-artifact@v3
57+
with:
58+
name: wheels
59+
path: dist
60+
61+
sdist:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
- name: Build sdist
66+
uses: PyO3/maturin-action@v1
67+
with:
68+
command: sdist
69+
args: --out dist
70+
- name: Upload sdist
71+
uses: actions/upload-artifact@v3
72+
with:
73+
name: wheels
74+
path: dist
75+
76+
release:
77+
name: Release
78+
runs-on: ubuntu-latest
79+
if: "startsWith(github.ref, 'refs/tags/')"
80+
needs: [linux, macos, sdist]
81+
steps:
82+
- uses: actions/download-artifact@v3
83+
with:
84+
name: wheels
85+
- name: Publish to PyPI
86+
uses: PyO3/maturin-action@v1
87+
env:
88+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
89+
with:
90+
command: upload
91+
args: --skip-existing *

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.env
2+
target

0 commit comments

Comments
 (0)