Skip to content

Commit 85672c7

Browse files
author
amiya
committed
code updated with readme
1 parent 3b74abf commit 85672c7

File tree

5 files changed

+313
-712
lines changed

5 files changed

+313
-712
lines changed

.github/workflows/CI.yml

Lines changed: 0 additions & 181 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
28+
- name: Install dependencies
29+
run: pip install maturin
30+
31+
- name: Build wheel
32+
run: maturin build --release --out dist
33+
34+
- name: Install package
35+
run: pip install --force-reinstall dist/*.whl
36+
37+
- name: Run tests
38+
run: python tests/test_all.py

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
name: Build and Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Build wheels
15+
uses: PyO3/maturin-action@v1
16+
with:
17+
command: build
18+
args: --release --out dist --find-interpreter
19+
manylinux: auto
20+
targets: |
21+
# Build wheels for linux
22+
x86_64-unknown-linux-gnu
23+
aarch64-unknown-linux-gnu
24+
# Build wheels for windows
25+
x86_64-pc-windows-msvc
26+
# Build wheels for macos
27+
x86_64-apple-darwin
28+
aarch64-apple-darwin
29+
30+
- name: Build sdist
31+
uses: PyO3/maturin-action@v1
32+
with:
33+
command: sdist
34+
args: --out dist
35+
36+
- name: Install Python and maturin
37+
uses: actions/setup-python@v5
38+
with:
39+
python-version: '3.x'
40+
- name: Install built package
41+
run: pip install --force-reinstall dist/*.whl
42+
43+
- name: Run tests
44+
run: python tests/test_all.py
45+
46+
- name: Publish to PyPI
47+
uses: PyO3/maturin-action@v1
48+
env:
49+
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
50+
with:
51+
command: upload
52+
args: --non-interactive --skip-existing dist/*

0 commit comments

Comments
 (0)