diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..112fdcb50 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,109 @@ +# CI Orchestrator — tiered fail-fast pipeline +# +# Calls the per-crate workflows in dependency tiers so that a failure in a +# leaf crate (tier 0) cancels all downstream jobs immediately instead of +# letting 18 jobs run for 20 minutes. +# +# Tier structure follows the Cargo workspace dependency graph: +# +# Tier 0 (leaf crates): models, core, boundary +# Tier 1 (substrate): compute, compute-cuda, compute-vulkan +# Tier 2 (engine): inference, vindex +# Tier 3 (API layer): kv, lql +# Tier 4 (applications): server, cli, shannon-verify +# +# Within each tier, all jobs run in parallel. A failure in any tier skips +# all subsequent tiers. Coverage jobs (where present) run in the same tier +# as their crate's test job via needs. +# +# The per-crate workflows still retain their own push/PR triggers with path +# filters, so a change touching only one crate still runs just that one +# workflow without the full pipeline. This orchestrator fires on every PR +# and on every push to main to provide the fail-fast gate. + +name: ci + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: {} + +jobs: + # ────────────────────────────────────────────────────────────── + # Tier 0 — leaf crates (everything depends on these transitively) + # ────────────────────────────────────────────────────────────── + models: + name: "T0 · models" + uses: ./.github/workflows/larql-models.yml + + core: + name: "T0 · core" + uses: ./.github/workflows/larql-core.yml + + boundary: + name: "T0 · boundary" + uses: ./.github/workflows/larql-boundary.yml + + # ────────────────────────────────────────────────────────────── + # Tier 1 — substrate (depends on tier 0) + # ────────────────────────────────────────────────────────────── + compute: + name: "T1 · compute" + needs: [models] + uses: ./.github/workflows/larql-compute.yml + + compute-cuda: + name: "T1 · compute-cuda" + needs: [models] + uses: ./.github/workflows/larql-compute-cuda.yml + + compute-vulkan: + name: "T1 · compute-vulkan" + needs: [models] + uses: ./.github/workflows/larql-compute-vulkan.yml + + # ────────────────────────────────────────────────────────────── + # Tier 2 — engine (depends on tier 1) + # ────────────────────────────────────────────────────────────── + inference: + name: "T2 · inference" + needs: [compute] + uses: ./.github/workflows/larql-inference.yml + + vindex: + name: "T2 · vindex" + needs: [compute] + uses: ./.github/workflows/larql-vindex.yml + + # ────────────────────────────────────────────────────────────── + # Tier 3 — API layer (depends on tier 2) + # ────────────────────────────────────────────────────────────── + kv: + name: "T3 · kv" + needs: [inference, vindex] + uses: ./.github/workflows/larql-kv.yml + + lql: + name: "T3 · lql" + needs: [inference, vindex] + uses: ./.github/workflows/larql-lql.yml + + # ────────────────────────────────────────────────────────────── + # Tier 4 — applications (depends on tier 3) + # ────────────────────────────────────────────────────────────── + server: + name: "T4 · server" + needs: [inference, vindex] + uses: ./.github/workflows/larql-server.yml + + cli: + name: "T4 · cli" + needs: [kv, lql] + uses: ./.github/workflows/larql-cli.yml + + shannon-verify: + name: "T4 · shannon-verify" + needs: [cli] + uses: ./.github/workflows/shannon-verify.yml diff --git a/.github/workflows/larql-boundary.yml b/.github/workflows/larql-boundary.yml index 5a3036eb6..c058e014d 100644 --- a/.github/workflows/larql-boundary.yml +++ b/.github/workflows/larql-boundary.yml @@ -7,20 +7,7 @@ name: larql-boundary on: - push: - branches: [main] - paths: - - 'crates/larql-boundary/**' - - 'Cargo.toml' - - 'Cargo.lock' - - '.github/workflows/larql-boundary.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-boundary/**' - - 'Cargo.toml' - - 'Cargo.lock' - - '.github/workflows/larql-boundary.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-cli.yml b/.github/workflows/larql-cli.yml index fd6c78b06..33db3482c 100644 --- a/.github/workflows/larql-cli.yml +++ b/.github/workflows/larql-cli.yml @@ -12,32 +12,7 @@ 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_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-compute-cuda.yml b/.github/workflows/larql-compute-cuda.yml index d583fc376..32023f6d1 100644 --- a/.github/workflows/larql-compute-cuda.yml +++ b/.github/workflows/larql-compute-cuda.yml @@ -13,28 +13,7 @@ name: larql-compute-cuda on: - push: - branches: [main] - paths: - - crates/larql-compute-cuda/** - - crates/larql-compute/** - - crates/larql-models/** - - crates/larql-vindex/** - - crates/larql-inference/** - - Cargo.toml - - Cargo.lock - - .github/workflows/larql-compute-cuda.yml - pull_request: - branches: [main] - paths: - - crates/larql-compute-cuda/** - - crates/larql-compute/** - - crates/larql-models/** - - crates/larql-vindex/** - - crates/larql-inference/** - - Cargo.toml - - Cargo.lock - - .github/workflows/larql-compute-cuda.yml + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-compute-vulkan.yml b/.github/workflows/larql-compute-vulkan.yml index 70d1dac89..a2cf233d0 100644 --- a/.github/workflows/larql-compute-vulkan.yml +++ b/.github/workflows/larql-compute-vulkan.yml @@ -11,28 +11,7 @@ name: larql-compute-vulkan on: - push: - branches: [main] - paths: - - crates/larql-compute-vulkan/** - - crates/larql-compute/** - - crates/larql-models/** - - crates/larql-vindex/** - - crates/larql-inference/** - - Cargo.toml - - Cargo.lock - - .github/workflows/larql-compute-vulkan.yml - pull_request: - branches: [main] - paths: - - crates/larql-compute-vulkan/** - - crates/larql-compute/** - - crates/larql-models/** - - crates/larql-vindex/** - - crates/larql-inference/** - - Cargo.toml - - Cargo.lock - - .github/workflows/larql-compute-vulkan.yml + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-compute.yml b/.github/workflows/larql-compute.yml index e816dc352..326fd3375 100644 --- a/.github/workflows/larql-compute.yml +++ b/.github/workflows/larql-compute.yml @@ -7,24 +7,7 @@ name: larql-compute on: - push: - branches: [main] - paths: - - 'crates/larql-compute/**' - - 'crates/larql-models/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-compute.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-compute/**' - - 'crates/larql-models/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-compute.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-core.yml b/.github/workflows/larql-core.yml index e8688c154..ace88daf6 100644 --- a/.github/workflows/larql-core.yml +++ b/.github/workflows/larql-core.yml @@ -8,22 +8,7 @@ name: larql-core on: - push: - branches: [main] - paths: - - 'crates/larql-core/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-core.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-core/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-core.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-inference.yml b/.github/workflows/larql-inference.yml index b8e1c215d..2e163c78a 100644 --- a/.github/workflows/larql-inference.yml +++ b/.github/workflows/larql-inference.yml @@ -13,30 +13,7 @@ name: larql-inference on: - push: - branches: [main] - paths: - - 'crates/larql-inference/**' - - 'crates/larql-compute/**' - - 'crates/larql-vindex/**' - - 'crates/larql-models/**' - - 'crates/larql-router-protocol/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-inference.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-inference/**' - - 'crates/larql-compute/**' - - 'crates/larql-vindex/**' - - 'crates/larql-models/**' - - 'crates/larql-router-protocol/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-inference.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-kv.yml b/.github/workflows/larql-kv.yml index b3499e7bd..38151acea 100644 --- a/.github/workflows/larql-kv.yml +++ b/.github/workflows/larql-kv.yml @@ -9,38 +9,7 @@ name: larql-kv on: - push: - branches: [main] - paths: - - 'crates/larql-kv/**' - - 'crates/larql-inference/src/test_utils.rs' - - 'crates/larql-inference/src/forward/**' - - 'crates/larql-inference/src/attention/**' - - 'crates/larql-inference/src/ffn/**' - - 'crates/larql-inference/src/residual.rs' - - 'crates/larql-inference/src/vindex/**' - - 'crates/larql-inference/src/model.rs' - - 'crates/larql-inference/src/layer_graph/pipeline_layer.rs' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-kv.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-kv/**' - - 'crates/larql-inference/src/test_utils.rs' - - 'crates/larql-inference/src/forward/**' - - 'crates/larql-inference/src/attention/**' - - 'crates/larql-inference/src/ffn/**' - - 'crates/larql-inference/src/residual.rs' - - 'crates/larql-inference/src/vindex/**' - - 'crates/larql-inference/src/model.rs' - - 'crates/larql-inference/src/layer_graph/pipeline_layer.rs' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-kv.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-lql.yml b/.github/workflows/larql-lql.yml index b20459da6..5d6fa3269 100644 --- a/.github/workflows/larql-lql.yml +++ b/.github/workflows/larql-lql.yml @@ -8,30 +8,7 @@ name: larql-lql on: - push: - branches: [main] - paths: - - 'crates/larql-lql/**' - - 'crates/larql-core/**' - - 'crates/larql-vindex/**' - - 'crates/larql-models/**' - - 'crates/larql-inference/src/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-lql.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-lql/**' - - 'crates/larql-core/**' - - 'crates/larql-vindex/**' - - 'crates/larql-models/**' - - 'crates/larql-inference/src/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-lql.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-models.yml b/.github/workflows/larql-models.yml index f83cf1e56..8a90fb6a8 100644 --- a/.github/workflows/larql-models.yml +++ b/.github/workflows/larql-models.yml @@ -7,20 +7,7 @@ name: larql-models on: - push: - branches: [main] - paths: - - 'crates/larql-models/**' - - 'Cargo.toml' - - 'Cargo.lock' - - '.github/workflows/larql-models.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-models/**' - - 'Cargo.toml' - - 'Cargo.lock' - - '.github/workflows/larql-models.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-server.yml b/.github/workflows/larql-server.yml index 610c0edd6..0977b7222 100644 --- a/.github/workflows/larql-server.yml +++ b/.github/workflows/larql-server.yml @@ -9,30 +9,7 @@ name: larql-server on: - push: - branches: [main] - paths: - - 'crates/larql-server/**' - - 'crates/larql-router-protocol/**' - - 'crates/larql-vindex/**' - - 'crates/larql-inference/src/**' - - 'crates/larql-models/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-server.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-server/**' - - 'crates/larql-router-protocol/**' - - 'crates/larql-vindex/**' - - 'crates/larql-inference/src/**' - - 'crates/larql-models/**' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-server.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/larql-vindex.yml b/.github/workflows/larql-vindex.yml index 765a360e4..2f00f36e1 100644 --- a/.github/workflows/larql-vindex.yml +++ b/.github/workflows/larql-vindex.yml @@ -8,26 +8,7 @@ name: larql-vindex on: - push: - branches: [main] - paths: - - 'crates/larql-vindex/**' - - 'crates/larql-lql/src/executor/lifecycle/compile/into_vindex.rs' - - 'crates/larql-compute/src/cpu/ops/q4k_q8k_dot.rs' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-vindex.yml' - pull_request: - branches: [main] - paths: - - 'crates/larql-vindex/**' - - 'crates/larql-lql/src/executor/lifecycle/compile/into_vindex.rs' - - 'crates/larql-compute/src/cpu/ops/q4k_q8k_dot.rs' - - 'Cargo.toml' - - 'Cargo.lock' - - 'Makefile' - - '.github/workflows/larql-vindex.yml' + workflow_call: {} workflow_dispatch: {} env: diff --git a/.github/workflows/shannon-verify.yml b/.github/workflows/shannon-verify.yml index 56f75eba2..a88e9969d 100644 --- a/.github/workflows/shannon-verify.yml +++ b/.github/workflows/shannon-verify.yml @@ -20,30 +20,7 @@ name: shannon-verify on: - push: - branches: [main] - paths: - - 'crates/larql-cli/**' - - 'crates/larql-inference/**' - - 'crates/larql-models/**' - - 'scripts/shannon_score_*.py' - - 'scripts/diagnose_models.py' - - 'tests/fixtures/shannon_frankenstein_2k.txt' - - '.github/workflows/shannon-verify.yml' - - 'Cargo.toml' - - 'Cargo.lock' - pull_request: - branches: [main] - paths: - - 'crates/larql-cli/**' - - 'crates/larql-inference/**' - - 'crates/larql-models/**' - - 'scripts/shannon_score_*.py' - - 'scripts/diagnose_models.py' - - 'tests/fixtures/shannon_frankenstein_2k.txt' - - '.github/workflows/shannon-verify.yml' - - 'Cargo.toml' - - 'Cargo.lock' + workflow_call: {} workflow_dispatch: {} env: