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: Install tectonic 0.17.0 (pinned)
run: |
curl -sSL -o /tmp/tectonic.tar.gz "https://github.com/tectonic-typesetting/tectonic/releases/download/tectonic%400.17.0/tectonic-0.17.0-x86_64-unknown-linux-gnu.tar.gz"
echo "1a715688baf591e650c8aeb160ae934e181685eecbb38b317de30b269ac5d606 /tmp/tectonic.tar.gz" | sha256sum -c -
sudo tar -xzf /tmp/tectonic.tar.gz -C /usr/local/bin tectonic
tectonic --version
- name: Build demo + showcase (tectonic engine)
run: |
"$VENV_BIN"/python examples/demo.py --engine tectonic
"$VENV_BIN"/python examples/ikat-paper/build.py --engine tectonic
- name: Embedded tectonic (cargo feature, linux-only)
run: |
sudo apt-get update -q
sudo apt-get install -qy pkg-config libfontconfig1-dev libfreetype6-dev \
libharfbuzz-dev libgraphite2-dev libicu-dev libpng-dev
cargo test --features tectonic --lib tectonic
- name: Regen main-paper plots (preset -> TikZ snapshots + PDFs)
run: '"$VENV_BIN"/python examples/regen/regen.py'
- name: Standalone figure proofs (fence -> TikZ -> PDF)
run: '"$VENV_BIN"/python examples/standalone/proofs.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 examples/regen/out --include="*.log"; then
echo "::error::TeX errors in build logs"; exit 1;
fi