Skip to content

perf: lazy proxy classes for O(1) property access (SimplicesProxy, Ve… #1

perf: lazy proxy classes for O(1) property access (SimplicesProxy, Ve…

perf: lazy proxy classes for O(1) property access (SimplicesProxy, Ve… #1

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "v*"
pull_request:
jobs:
python-tests:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install maturin pytest scipy
- name: Build extension in editable mode
run: maturin develop
- name: Run test suite
run: pytest -x -v
rust-checks:
name: Rust checks
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Cache Rust artifacts
uses: Swatinem/rust-cache@v2
- name: Run cargo tests
run: cargo test --all-targets
- name: Run clippy
run: cargo clippy --all-targets -- -D warnings
build-wheels:
name: Build wheels on ${{ matrix.os }}
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
args: --release --out dist
manylinux: auto
sccache: "true"
- name: Upload wheel artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: dist
build-sdist:
name: Build source distribution
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload source distribution
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs:
- build-wheels
- build-sdist
permissions:
contents: read
id-token: write
steps:
- name: Download built artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Publish distributions
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist