Add Python bindings #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python | |
# spell-checker:ignore pyproject,pydata,jakebailey | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- 'bindings/python/**' | |
- 'pyproject.toml' | |
- 'crates/**' | |
- 'Cargo.*' | |
pull_request: | |
branches: ["main"] | |
paths: | |
- 'bindings/python/**' | |
- 'pyproject.toml' | |
- 'crates/**' | |
- 'Cargo.*' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint-doc: | |
name: Lint & Doc | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install tools & dependencies | |
run: python -m pip install --upgrade pip ruff sphinx pydata-sphinx-theme | |
- name: Build | |
run: python -m pip install . | |
- name: Ruff check | |
run: ruff check --output-format=github | |
- name: Ruff format check | |
run: ruff format --check | |
- uses: jakebailey/pyright-action@v2 | |
- name: Sphinx | |
run: sphinx-build -W bindings/python/doc build/python-doc | |
linux-buildwheel: | |
name: Build wheels for Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64,s390x,ppc64le | |
- name: Install cibuildwheel | |
run: python3 -m pip install cibuildwheel | |
- name: Build (linux-buildwheel.py) | |
run: python3 bindings/python/build/linux-buildwheel.py --install-targets --archs all | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: python-wheels-linux | |
path: wheelhouse/*.whl |