Skip to content

Handle failures in lowering / compilation of jitted functions #13

Handle failures in lowering / compilation of jitted functions

Handle failures in lowering / compilation of jitted functions #13

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: j178/prek-action@v1
test:
name: Run tests on Python ${{ matrix.python.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- version: '3.10'
jax: '>=0.6,<0.7'
- version: '3.11'
jax: '>=0.7,<0.8'
- version: '3.12'
jax: '>=0.7,<0.8'
- version: '3.13'
jax: '>=0.8,<0.9'
- version: '3.14'
jax: '>=0.9'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python.version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python.version }}
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Build wheel
run: uv build --wheel
- name: Install project's wheel and dependencies
run: |
uv sync --locked --no-install-project
uv pip install dist/zeropybench-*.whl
uv pip install "jax${{ matrix.python.jax }}"
- name: Run unit tests
run: |
source .venv/bin/activate
python -c "import jax; print(f'JAX version: {jax.__version__}')"
pytest -v --cov=zeropybench --cov-report=xml tests
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y graphviz
- name: Run notebook tests
if: matrix.python.version == '3.14'
run: |
source .venv/bin/activate
pytest -v docs
- name: Upload coverage to Codecov
if: matrix.python.version == '3.12'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
fail_ci_if_error: false