Skip to content

PARETO-1 rung A: the K-quant path, and the instrument it is measured with #746

PARETO-1 rung A: the K-quant path, and the instrument it is measured with

PARETO-1 rung A: the K-quant path, and the instrument it is measured with #746

Workflow file for this run

# larql-cli cross-platform CI
#
# Top-level `larql` binary. Default features enable Metal on every
# member crate, which only resolves on macOS. Linux/Windows runs use
# `--no-default-features` so the CPU-only surface is exercised. macOS
# runs include defaults so the Metal feature path is checked too.
#
# `convert_moe_to_per_layer` example currently doesn't build against
# the post-refactor `larql-inference` API; CI checks bins + tests
# instead of `--all-targets` until that example is repaired.
name: larql-cli
on:
push:
branches: [main]
paths:
- 'crates/larql-cli/**'
- 'crates/larql-lql/**'
- 'crates/larql-kv/**'
- 'crates/larql-vindex/**'
- 'crates/larql-models/**'
- 'crates/larql-inference/src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'Makefile'
- '.github/workflows/larql-cli.yml'
pull_request:
branches: [main]
paths:
- 'crates/larql-cli/**'
- 'crates/larql-lql/**'
- 'crates/larql-kv/**'
- 'crates/larql-vindex/**'
- 'crates/larql-models/**'
- 'crates/larql-inference/src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'Makefile'
- '.github/workflows/larql-cli.yml'
workflow_dispatch: {}
jobs:
test:
name: test - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 35
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-14]
steps:
- uses: actions/checkout@v7
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Install OpenBLAS (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libopenblas-dev pkg-config
- name: Install OpenBLAS (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$vcpkgRoot = $env:VCPKG_INSTALLATION_ROOT
if (-not $vcpkgRoot) { $vcpkgRoot = "C:\vcpkg" }
"VCPKG_ROOT=$vcpkgRoot" | Out-File -FilePath $env:GITHUB_ENV -Append
& "$vcpkgRoot\vcpkg.exe" install openblas:x64-windows
# protoc on PATH satisfies the `cfg(not(windows))` skip in
# `larql-router-protocol` / `larql-server`. See those build.rs
# files for the rationale.
- name: Install protoc (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: choco install protoc -y --no-progress
- name: Cache cargo registry (downloads only, never target/)
uses: actions/cache@v6
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-reg2-cli-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-reg2-cli-
- name: No compiled workspace artefacts may be restored
shell: bash
run: |
# The cache above carries downloads only. A target/ restored from
# another commit can satisfy a link against stale code, so a green
# matrix would be evidence about an artefact that is not in this
# commit. Fail loudly rather than build on one.
if [ -e target ]; then
echo "::error::target/ was restored from cache - the cache key or path is wrong"
exit 1
fi
- name: Format check
run: cargo fmt -p larql-cli -- --check
- name: Check (CPU only) on Linux/Windows
if: runner.os != 'macOS'
run: cargo check -p larql-cli --bins --tests --no-default-features
- name: Check (default features incl. gpu) on macOS
if: runner.os == 'macOS'
run: cargo check -p larql-cli --bins --tests
# Re-enabled 2026-08-06 (issue #169). The backlog this step was
# disabled for on 2026-05-10 — ~82 errors under default features and
# ~112 under `--no-default-features`, mostly `large_enum_variant` and
# `dead_code` on metal-only paths — has since been cleared by other
# work. Both feature shapes now report zero under `-D warnings`.
#
# `--no-deps` matches the other crates' workflows: it keeps the gate
# on larql-cli's own code, so a lint that fires in a path dependency
# reds that dependency's workflow rather than this one.
#
# The feature split mirrors the Check steps above, and for the same
# reason: `gpu` pulls in larql-compute-metal, which only exists on
# macOS.
- name: Clippy (CPU only) on Linux/Windows
if: runner.os != 'macOS'
run: cargo clippy -p larql-cli --bins --tests --no-default-features --no-deps -- -D warnings
- name: Clippy (default features incl. gpu) on macOS
if: runner.os == 'macOS'
run: cargo clippy -p larql-cli --bins --tests --no-deps -- -D warnings
- name: Tests (CPU only) on Linux/Windows
if: runner.os != 'macOS'
run: cargo test -p larql-cli --no-default-features
- name: Tests (default features) on macOS
if: runner.os == 'macOS'
run: cargo test -p larql-cli
# R3B: validates the checked-out PR's own registry/index.json +
# registry/models/*.json, through the exact assembly/validation
# code production_registry() uses (include_str! embeds whatever
# this checkout has at build time) — never a parallel checker
# that could drift from what the shipped binary actually accepts.
# Runs on all three OSes so a platform-specific path bug (the
# Windows-absolute-path class registry/reference.rs already hit
# once) shows up here too, not just in unit tests.
- name: Registry check (CPU only) on Linux/Windows
if: runner.os != 'macOS'
run: cargo run -p larql-cli --no-default-features -- registry check
- name: Registry check (default features) on macOS
if: runner.os == 'macOS'
run: cargo run -p larql-cli -- registry check
coverage:
name: coverage - ubuntu
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- uses: actions/checkout@v7
- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable
- name: Install OpenBLAS
run: |
sudo apt-get update
sudo apt-get install -y libopenblas-dev pkg-config
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Coverage summary
run: cargo llvm-cov --package larql-cli --no-default-features --summary-only