ci: restructure into reusable workflows + PR coverage gating - #79
Closed
ekryski wants to merge 3 commits into
Closed
ci: restructure into reusable workflows + PR coverage gating#79ekryski wants to merge 3 commits into
ekryski wants to merge 3 commits into
Conversation
…bench)
Replaces the monolithic `check.yml` + `iron.yml` with focused, reusable
workflows driven by one orchestrator, so each concern is its own file, the
iron binary is built once per run, and adding CUDA/HIP runners later is a
one-line matrix entry.
ci.yml (orchestrator) changes → lint → {build, test, correctness}
release (tag only, needs build+test+correctness)
lint.yml typos, fmt, clippy, commit-hygiene (ubuntu). Every PR + release.
build.yml compile the iron CLI once (cached, uploaded) → `iron build`
kernel compile-check. Consolidates iron.yml's compile+build.
test.yml cargo nextest: Rust logic on ubuntu (GPU tests cfg out there) +
a macOS job for the GPU integration tests, minus the per-kernel
harness (owned by correctness).
correctness.yml `iron test` (GPU-vs-CPU-oracle), parameterised by
runner+backend for future NVIDIA/AMD hosts.
bench.yml full suite (no heavy/light split), manual dispatch only.
Shared setup is DRY'd into composite actions (.github/actions/setup-rust,
setup-iron — the latter also installs the macos-26 Metal Toolchain). Light
path filter skips docs-only PRs for the heavy jobs; lint still runs on them.
Releases are gated: on a `v*` tag ci.yml runs the full suite before calling
release.yml. coverage.yml + pr.yml keep their separate concerns.
- Rename test.yml's ubuntu cargo job `logic` -> `iron` / "Iron Core (ubuntu)". - Make coverage.yml reusable (workflow_call) and wire it into ci.yml so instrumented `llvm-cov --workspace` runs on every code PR (was push-to-main only). codecov now posts the diff-coverage comment on PRs and its status checks can gate merges. - codecov.yml already enforces the requested gates — patch (new/changed code) >= 80% so 0%-covered new code fails, and a per-crate + project ratchet that fails on any coverage decrease. Add a `std` flag for wh-iron-std's host / dispatch code (the coverable half of "kernels"; the `#[kernel]` DSL bodies stay excluded — the proc-macro consumes them so they never execute as Rust, and are validated via GPU correctness / bench instead). To make coverage BLOCK merges, add the codecov "project" and "patch" checks to the branch protection rule. To turn the >= 80% goal into a hard project floor (vs the current no-regression ratchet), flip project `target: auto` -> `target: 80%` once the codebase is at 80% — the first PR coverage run will show where it stands.
…ers, timeouts) Addresses the "no false skips/passes/failures" review concern now that the restructure routes GPU kernel correctness through `iron test` (correctness.yml) instead of the cargo `all_registered_kernel_tests_pass` harness. - `iron test`: with NO filter and zero registered `#[test_kernel]`s, FAIL instead of returning Ok. Zero kernels means the inventory failed to link (dead-strip / registration regression), not that everything passed — a correctness gate that dispatched nothing must never report green. This restores the cargo harness's `total > 0` guard on the CLI path. (A user-supplied filter matching nothing stays a benign warning.) The runner's MPP skip is already precise — it requires BOTH `requires_cooperative_tensors()` AND the `deferred-static-alloca` marker (harness.rs), so no MPP kernel is skipped by a coarse family gate. - Log `sw_vers` on every macOS job (via the setup-iron composite + the standalone Metal Toolchain steps). The coop-tensor skips are an OS-version gap (< 26.5); when the image rolls forward the skips vanish on their own and this makes that visible. (Tom's review rec.) - Bump the macOS GPU-sweep timeouts 30 -> 45 min (correctness / test-gpu / coverage) — headroom as the kernel registry grows, per the review's timeout watch-item. The ubuntu logic job stays at 30.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Overhauls GitHub Actions into focused, reusable workflows driven by one orchestrator, and turns coverage into a PR gate.
Structure
Composite actions (DRY):
setup-rust(toolchain + cache),setup-iron(download the once-built binary + install the macos-26 Metal Toolchain).Reusable workflows called by
ci.yml:lint.ymlbuild.ymliron buildkernel check. Consolidates iron.yml's redundant compile+buildtest.ymlIron Core (ubuntu)cargo logic + macOS GPU-integration cargo tests (minus the per-kernel harness, owned by correctness)correctness.ymliron testvs CPU oracle — parameterized by runner+backend for future CUDA/HIPcoverage.ymlllvm-cov --workspace, uploads to codecovbench.ymlcheck.yml+iron.ymlare deleted;coverage.yml/release.ymlbecame reusable;pr.ymlunchanged.Behavior
ironbinary is built once per run and shared via artifact — no re-compiles across jobs.v*tag runs the full suite beforerelease.ymlpublishes.Coverage gating
codecov.ymlenforces: patch ≥ 80% on new/changed code (so 0%-covered new code fails) and a per-crate + project ratchet that fails on any coverage decrease. Added astdflag for wh-iron-std's host/dispatch code.#[kernel]DSL bodies stay excluded from line coverage — the proc-macro consumes them so they never execute as Rust; they're validated via GPU correctness + bench.Two follow-ups for the repo owner:
target: auto→target: 80%once the codebase reaches 80% — the first PR coverage run shows where it stands.Validation
actionlintclean on all workflows + composites. The reusable-workflow + composite wiring was proven live on a prior push (lint jobs ran under the orchestrator asLint / *); this PR's own CI run exercises the full graph end-to-end.