Skip to content

update from bleepblop #10

update from bleepblop

update from bleepblop #10

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request:
jobs:
test:
name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Cache Rust
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install test dependencies
run: pip install pytest
- name: Build wheel
uses: messense/maturin-action@v1
with:
manylinux: auto
command: build
args: >-
--release
-o dist
--find-interpreter
${{ matrix.os == 'macos-latest' && '--universal2' || '' }}
${{ matrix.os == 'ubuntu-latest' && '--sdist' || '' }}
- name: Install wheel
run: pip install dist/*.whl
- name: Run tests
run: make test
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}-py${{ matrix.python-version }}
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Combine wheels
run: |
mkdir dist
cp artifacts/wheels-*/* dist/
- name: Publish to PyPI
uses: messense/maturin-action@v1
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
with:
command: upload
args: --skip-existing dist/*