Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI
on:
pull_request:
paths: ['src/**', 'tests/**', 'benchmarks/**', 'Cargo.*', 'pyproject.toml', 'uv.lock', '.github/workflows/ci.yml']
push:
branches: [main]
paths: ['src/**', 'tests/**', 'benchmarks/**', 'Cargo.*', 'pyproject.toml', 'uv.lock', '.github/workflows/ci.yml']
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --check
- run: cargo clippy --locked --all-targets -- -D warnings
msrv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@1.88.0
- run: cargo check --locked
regression:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- uses: dtolnay/rust-toolchain@stable
- run: python -m pip install maturin numpy pytest
- run: maturin build --release --locked --out dist
- name: Install built wheel
run: python -c "import glob, subprocess, sys; subprocess.check_call([sys.executable, '-m', 'pip', 'install', *glob.glob('dist/*.whl')])"
- run: python -m pytest -q
- name: Benchmark installed wheel
if: matrix.python == '3.12'
run: python benchmarks/compare.py --output benchmark.json
- uses: actions/upload-artifact@v4
if: matrix.python == '3.12'
with:
name: benchmark-${{ matrix.os }}
path: benchmark.json
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
target/
.DS_Store
__pycache__
.venv/
.pytest_cache/
dist/
Loading
Loading