Skip to content

Merge pull request #2 from NeLy-EPFL/worktree-fixed-base-arms #18

Merge pull request #2 from NeLy-EPFL/worktree-fixed-base-arms

Merge pull request #2 from NeLy-EPFL/worktree-fixed-base-arms #18

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
rust-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
# Also exercises the cpp/ (cxx) crate, since it's a workspace member --
# this just builds it, as it has no #[test]s of its own (see the
# cpp-test job below for the C++ bindings' own suite). python/'s
# bindings have their own pytest suite -- see the python-test job below.
- run: cargo test --workspace
cpp-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cmake -S cpp -B cpp/build -DCMAKE_BUILD_TYPE=Release
- run: cmake --build cpp/build -j
- run: ./cpp/build/quickik_cpp_tests
python-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- uses: astral-sh/setup-uv@v7
- run: uv venv --python 3.12
# Each `run:` step is a fresh shell, so .venv/bin has to be persisted
# via GITHUB_PATH for it to resolve `maturin`/`pytest` by bare name in
# later steps -- it doesn't happen automatically just by installing
# into that venv.
- run: echo "$PWD/.venv/bin" >> "$GITHUB_PATH"
# maturin needs an active virtualenv to know where to install the
# built extension -- a bare `pip install` with no venv at all doesn't
# give it one. `uv pip install` (no explicit --python) auto-targets
# the .venv just created above, and maturin's own "look for a .venv
# in the current or any parent directory" fallback then finds that
# same one from python/, without needing VIRTUAL_ENV set.
- run: uv pip install maturin pytest
- run: cd python && maturin develop --release
- run: pytest python/tests/
python-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v7
- run: cd devtools-pyenv && uv sync
# ruff.toml at the root covers python/tests/, benchmark/, and
# devtools-pyenv/ itself.
- run: cd devtools-pyenv && uv run ruff check ..