name: ci
on:
push:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: dtolnay/rust-toolchain@stable
- name: Venv + build deps
run: |
python -m venv .venv
if [ -d .venv/Scripts ]; then VENV_BIN="$PWD/.venv/Scripts";
else VENV_BIN="$PWD/.venv/bin"; fi
echo "VENV_BIN=$VENV_BIN" >> "$GITHUB_ENV"
"$VENV_BIN"/python -m pip install -q "maturin>=1.15,<2" "pytest>=8" "mcp>=1,<2"
- name: Rust tests
run: cargo test --locked
- name: Build module
run: '"$VENV_BIN"/python -m maturin develop'
- name: Python tests
run: '"$VENV_BIN"/python -m pytest tests/'
tex:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: dtolnay/rust-toolchain@stable
- name: Install TeX Live
run: >
sudo apt-get update -q &&
sudo apt-get install -y -q
texlive-latex-base texlive-latex-recommended
texlive-pictures texlive-publishers
- name: Venv + build deps
run: |
python -m venv .venv
if [ -d .venv/Scripts ]; then VENV_BIN="$PWD/.venv/Scripts";
else VENV_BIN="$PWD/.venv/bin"; fi
echo "VENV_BIN=$VENV_BIN" >> "$GITHUB_ENV"
"$VENV_BIN"/python -m pip install -q "maturin>=1.15,<2" "mcp>=1,<2"
- name: Build module
run: '"$VENV_BIN"/python -m maturin develop'
- name: Build demo
run: '"$VENV_BIN"/python examples/demo.py'
- name: Build showcase paper
run: '"$VENV_BIN"/python examples/ikat-paper/build.py'
- name: No undefined citations
run: |
if grep -rE "There were undefined references|Citation .* undefined|Undefined control sequence" \
examples/demo-out examples/ikat-paper/out --include="*.log"; then
echo "::error::TeX errors in build logs"; exit 1;
fi