Skip to content

ci and uv

ci and uv #28

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- "*"
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- "3.12"
- "3.13"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- run: uv python install ${{ matrix.python }}
- run: uv run pytest
build:
name: build (${{ matrix.platform }} ${{ matrix.target }} ${{ matrix.interpreter }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
platform: [linux, darwin]
target: [x86_64, aarch64]
interpreter: ["3.12 3.13"]
include:
- platform: linux
runner: ubuntu-latest
- platform: darwin
runner: macos-latest
steps:
- uses: actions/checkout@v4
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist --interpreter ${{ matrix.interpreter }}
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.platform }}-${{ matrix.target }}
path: dist
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs:
- test
- build
steps:
- uses: actions/download-artifact@v4
with:
path: dist
pattern: dist-*
merge-multiple: true
- uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
commit: ${{ github.sha }}