ruvector/.github/workflows/ci.yml
ruvnet 0edc4b985f ci: switch all CI workflows from ubuntu-latest to ubuntu-22.04
ubuntu-latest (→ubuntu-24.04) runners are consistently exhausted on the
free plan. Build Native Modules uses ubuntu-22.04 explicitly and always
gets runners immediately. Switching clippy-fmt, Workspace CI,
regression-guard, supply-chain, and WASM Dedup Check to the same pool.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-22 09:29:02 -04:00

353 lines
13 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Workspace CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
# Skip building unused proc-macro features in test bin link steps
CARGO_INCREMENTAL: 0
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-22.04
timeout-minutes: 30
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
check:
name: Cargo check
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Cargo check (workspace)
run: cargo check --workspace --exclude ruvector-postgres
clippy:
name: Clippy
runs-on: ubuntu-22.04
timeout-minutes: 30
continue-on-error: true
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Clippy (workspace)
run: cargo clippy --workspace --exclude ruvector-postgres --all-targets -- -W warnings
# The full workspace test suite exceeds the 30-minute timeout on a single
# runner. We split the work into parallel matrix jobs grouped by domain so
# each shard fits comfortably under the timeout, and use `cargo-nextest` for
# faster test discovery and execution.
test:
name: Tests (${{ matrix.name }})
runs-on: ubuntu-22.04
# `core-and-rest` is the catch-all shard and compiles ~50 crates; on a
# cold cache the build alone has hit ~90min, so headroom matters more
# than tight feedback for this job. Faster shards still finish in ~1020m.
# Iter 231 — bumped 150→180. Historical successful runs landed at
# 2h 30m 16s (just under the old cap); two PR-413 runs (iter 228 +
# iter 230) both hit the cap and got cancelled mid-test. Excluding
# the iter-219 hailo crates from the catch-all (iter 230) was a
# necessary but not sufficient fix — the shard was already at the
# ragged edge. 180min gives ~30min headroom on the typical 150min
# run; if a shard's natural duration drifts further we should split
# crates out into a new sibling shard rather than push this higher.
timeout-minutes: 180
strategy:
fail-fast: false
matrix:
include:
- name: vector-index
packages: >-
-p ruvector-rabitq
-p ruvector-rulake
-p ruvector-diskann
-p ruvector-graph
-p ruvector-gnn
-p ruvector-cnn
- name: rvagent
packages: >-
-p rvagent-a2a
-p rvagent-acp
-p rvagent-backends
-p rvagent-cli
-p rvagent-core
-p rvagent-mcp
-p rvagent-middleware
-p rvagent-subagents
-p rvagent-tools
-p rvagent-wasm
- name: ruvix
packages: >-
-p ruvix-aarch64
-p ruvix-bench
-p ruvix-boot
-p ruvix-cap
-p ruvix-demo
-p ruvix-drivers
-p ruvix-hal
-p ruvix-integration
-p ruvix-nucleus
-p ruvix-proof
-p ruvix-queue
-p ruvix-region
-p ruvix-sched
-p ruvix-shell
-p ruvix-types
-p ruvix-vecgraph
- name: ruqu-quantum
packages: >-
-p ruqu
-p ruqu-algorithms
-p ruqu-core
-p ruqu-exotic
-p ruqu-wasm
- name: ml-research-heavy
# Heaviest crates split into their own shard so ml-research
# doesn't exceed the 45-min timeout.
packages: >-
-p ruvector-attention
-p ruvector-mincut
-p ruvector-fpga-transformer
-p ruvector-graph-transformer
- name: ml-research-rest
packages: >-
-p ruvector-scipix
-p ruvector-sparse-inference
-p ruvector-sparsifier
-p ruvector-solver
-p ruvector-domain-expansion
-p ruvector-robotics
- name: core-and-rest-heavy
# Hoist the known-heavy long-tail crates out of core-and-rest
# so neither shard exceeds the 90-min timeout.
packages: >-
-p ruvllm
-p ruvllm-cli
-p ruvector-dag
-p ruvector-nervous-system
-p ruvector-math
-p ruvector-consciousness
-p prime-radiant
-p mcp-brain
-p ruvector-decompiler
- name: core-and-rest-wasm
# Iter 232 — split out the 29 *-wasm crates from core-and-rest
# because the catch-all shard had grown to 115 crates and was
# consistently missing the 180min cap (iter-228 + iter-230 +
# iter-231 all cancelled at the timeout boundary). The wasm
# crates are a natural sub-group: thin bindings on top of host
# crates, easy to compile + test in isolation.
packages: >-
-p neural-trader-wasm
-p ruvector-acorn-wasm
-p ruvector-attention-unified-wasm
-p ruvector-attention-wasm
-p ruvector-cnn-wasm
-p ruvector-consciousness-wasm
-p ruvector-dag-wasm
-p ruvector-decompiler-wasm
-p ruvector-delta-wasm
-p ruvector-domain-expansion-wasm
-p ruvector-economy-wasm
-p ruvector-exotic-wasm
-p ruvector-fpga-transformer-wasm
-p ruvector-gnn-wasm
-p ruvector-graph-transformer-wasm
-p ruvector-graph-wasm
-p ruvector-learning-wasm
-p ruvector-math-wasm
-p ruvector-mincut-gated-transformer-wasm
-p ruvector-mincut-wasm
-p ruvector-nervous-system-wasm
-p ruvector-rabitq-wasm
-p ruvector-router-wasm
-p ruvector-solver-wasm
-p ruvector-sparsifier-wasm
-p ruvector-tiny-dancer-wasm
-p ruvector-verified-wasm
-p ruvector-wasm
# Iter 233 — `ruvllm-wasm` excluded from native nextest:
# 11 of its 195 tests (sona_instant + workers::feature_detect)
# fail or SIGABRT on native because they're wasm-target
# specific (need wasm-bindgen-test). Surfaced by iter-232's
# split; previously masked by the iter-228..231 timeout
# cancellations of the megaShard. Tracking as workspace
# follow-up — fix is to gate the affected modules behind
# `#[cfg(target_arch = "wasm32")]` or migrate to
# wasm-bindgen-test runners.
- name: core-and-rest
# Everything else: core, delta, server/cluster, etc.
# Uses --workspace + --exclude to subtract the groups above so we
# don't have to enumerate ~100 crates by hand.
packages: >-
--workspace
--exclude ruvector-postgres
--exclude ruvector-decompiler
--exclude ruvllm
--exclude ruvllm-cli
--exclude ruvector-dag
--exclude ruvector-nervous-system
--exclude ruvector-math
--exclude ruvector-consciousness
--exclude prime-radiant
--exclude mcp-brain
--exclude ruvector-rabitq
--exclude ruvector-rulake
--exclude ruvector-diskann
--exclude ruvector-graph
--exclude ruvector-gnn
--exclude ruvector-cnn
--exclude rvagent-a2a
--exclude rvagent-acp
--exclude rvagent-backends
--exclude rvagent-cli
--exclude rvagent-core
--exclude rvagent-mcp
--exclude rvagent-middleware
--exclude rvagent-subagents
--exclude rvagent-tools
--exclude rvagent-wasm
--exclude ruvix-aarch64
--exclude ruvix-bench
--exclude ruvix-boot
--exclude ruvix-cap
--exclude ruvix-demo
--exclude ruvix-drivers
--exclude ruvix-hal
--exclude ruvix-integration
--exclude ruvix-nucleus
--exclude ruvix-proof
--exclude ruvix-queue
--exclude ruvix-region
--exclude ruvix-sched
--exclude ruvix-shell
--exclude ruvix-types
--exclude ruvix-vecgraph
--exclude ruqu
--exclude ruqu-algorithms
--exclude ruqu-core
--exclude ruqu-exotic
--exclude ruqu-wasm
--exclude ruvector-attention
--exclude ruvector-mincut
--exclude ruvector-scipix
--exclude ruvector-fpga-transformer
--exclude ruvector-sparse-inference
--exclude ruvector-sparsifier
--exclude ruvector-solver
--exclude ruvector-graph-transformer
--exclude ruvector-domain-expansion
--exclude ruvector-robotics
--exclude hailort-sys
--exclude ruvector-hailo
--exclude ruvector-mmwave
--exclude ruvector-hailo-cluster
--exclude neural-trader-wasm
--exclude ruvector-acorn-wasm
--exclude ruvector-attention-unified-wasm
--exclude ruvector-attention-wasm
--exclude ruvector-cnn-wasm
--exclude ruvector-consciousness-wasm
--exclude ruvector-dag-wasm
--exclude ruvector-decompiler-wasm
--exclude ruvector-delta-wasm
--exclude ruvector-domain-expansion-wasm
--exclude ruvector-economy-wasm
--exclude ruvector-exotic-wasm
--exclude ruvector-fpga-transformer-wasm
--exclude ruvector-gnn-wasm
--exclude ruvector-graph-transformer-wasm
--exclude ruvector-graph-wasm
--exclude ruvector-learning-wasm
--exclude ruvector-math-wasm
--exclude ruvector-mincut-gated-transformer-wasm
--exclude ruvector-mincut-wasm
--exclude ruvector-nervous-system-wasm
--exclude ruvector-rabitq-wasm
--exclude ruvector-router-wasm
--exclude ruvector-solver-wasm
--exclude ruvector-sparsifier-wasm
--exclude ruvector-tiny-dancer-wasm
--exclude ruvector-verified-wasm
--exclude ruvector-wasm
--exclude ruvllm-wasm
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
key: test-${{ matrix.name }}
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: Run tests (${{ matrix.name }})
run: cargo nextest run --no-fail-fast ${{ matrix.packages }}
- name: Run doctests (${{ matrix.name }})
# nextest does not run doctests; do them in a separate step. Cheap
# because compilation is already cached from the nextest run.
run: cargo test --doc ${{ matrix.packages }}
audit:
name: Security audit
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install cargo-audit
uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- name: Run cargo audit
# Configuration (including the justified ignore list) lives in
# .cargo/audit.toml at the workspace root.
run: cargo audit