Skip to content

perf: eliminate JIT recompilation in single integrator sweep #90

perf: eliminate JIT recompilation in single integrator sweep

perf: eliminate JIT recompilation in single integrator sweep #90

Workflow file for this run

name: CI
on:
push:
branches: [ "main", "develop" ]
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
env:
JAX_PLATFORM_NAME: cpu
UV_CACHE_DIR: /tmp/.uv-cache
JAX_COMPILATION_CACHE_DIR: /tmp/jax_cache
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache uv
uses: actions/cache@v4
with:
path: /tmp/.uv-cache
key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Cache JAX compilation
uses: actions/cache@v4
with:
path: /tmp/jax_cache
key: ${{ runner.os }}-jax-${{ github.sha }}
restore-keys: |
${{ runner.os }}-jax-
- name: Install dependencies
env:
UV_SYSTEM_PYTHON: 1
run: |
pip install uv
if [ "${{ matrix.python-version }}" == "3.10" ]; then
uv pip install -e ".[dev]" ruff mypy
else
uv pip install -e ".[dev]"
fi
- name: Lint with ruff
if: matrix.python-version == '3.10'
env:
UV_SYSTEM_PYTHON: 1
run: |
ruff check src
- name: Type check with mypy
if: matrix.python-version == '3.10'
env:
UV_SYSTEM_PYTHON: 1
run: |
mypy src/cbfkit || true
- name: Test with pytest
run: |
pytest -m "not slow" tests
- name: Test slow tests
if: matrix.python-version == '3.10'
env:
CBFKIT_TEST_MODE: "1"
run: |
pytest -m "slow" tests