ci: split ci.yml into reusable build + test workflows#172
Draft
robtaylor wants to merge 5 commits into
Draft
Conversation
69aa31e to
34eff47
Compare
Introduce the build half of the planned build/test split (see
docs/plans/ci-build-test-split.md): a reusable `build.yml` (on:
workflow_call) that compiles jacquard for each target config on a cheap
standard runner and uploads one artifact per config —
jacquard-{cpu,cuda,hip,metal}, all carrying the `synth` on-ramp.
The divergent toolchain setup is extracted into composite actions so it
is shared between the build job and the matching test job later:
- init-submodules: parameterised submodule init
- setup-cuda: CUDA toolkit (compile) or cudart (runtime-only)
- setup-hip: composes setup-cuda + ROCm/HIP (NVIDIA backend)
- setup-metal: Homebrew LLVM (clang+OpenMP), or runtime dylibs only
Nothing triggers build.yml yet (workflow_call is dormant); the thin
ci.yml orchestrator and test.yml follow in subsequent commits. The
cuda/hip artifacts are separate for now but ulib already supports both
backends in one binary, so the matrix can later collapse them into one
fat cuda,hip artifact without reshaping the workflow.
Co-developed-by: Claude Code v2.1.201 (claude-opus-4-8)
Cut the monolithic 2056-line ci.yml over to the build/test pipeline from
docs/plans/ci-build-test-split.md:
ci.yml (orchestrator) → changes → build.yml → test.yml
→ docs (Pages, ungated)
- test.yml (reusable): the full test batch against the prebuilt artifacts
from build.yml, on the appropriate runners — CPU/compile-in-place jobs
on ubuntu, CUDA/HIP on the GitHub-hosted T4, Metal + MCU-SoC + JTAG on
macos-latest-xlarge. Faithful move: each backend keeps its current test
content (Metal its rich suite, CUDA/HIP the shared gpu_test_suite.sh);
unifying the batch across backends is a tracked follow-up.
- ci.yml is now a thin orchestrator. It passes `code` (docs-only gate) and
`build_result` into test.yml so a FAILED build surfaces as a FAILED
required check via each artifact job's explicit build-gate step, rather
than a silently-passing skip. docs stays inline (Pages deploy needs
contents:write and must run on docs-only pushes).
- Self-hosted nvidia1 (cuda-blackwell) is non-gating: it skips — not fails
— when the build didn't succeed, so an offline box never blocks a merge.
- CVC mcu-soc path is now an advisory guide, not a gate: mcu-soc-comparison
gains continue-on-error so a CVC<->Metal mismatch is surfaced in the step
summary without blocking merges (mcu-soc-cvc was already advisory).
- New download-jacquard composite action single-sources the artifact
download+chmod (jacquard-<backend>) across the 8 GPU/downstream jobs.
The old per-job build steps are gone — GPU jobs consume build.yml's
artifacts. cuda/hip stay separate artifacts for now; the matrix is shaped
so a future fat cuda,hip binary collapses them without reshaping the flow.
Co-developed-by: Claude Code v2.1.201 (claude-opus-4-8)
Co-developed-by: Claude Code v2.1.201 (claude-opus-4-8)
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 & why
The organically-grown
ci.ymlhad reached 2056 lines with build and testlogic interleaved per backend. This splits it into a build → test pipeline
behind a thin orchestrator, so every target configuration is compiled once on a
cheap standard runner and the resulting binary is handed to the test jobs on the
appropriate runners. Full design in
docs/plans/ci-build-test-split.md.build.yml(reusable,workflow_call): a 4-way matrix producing oneartifact per config —
jacquard-{cpu,cuda,hip,metal}, all carrying thesynthon-ramp. CUDA isall-majorSASS so one build feeds both the T4 andthe self-hosted Blackwell runner.
test.yml(reusable): the full test batch run against those prebuiltartifacts. CPU/compile-in-place jobs on
ubuntu-latest; CUDA/HIP on theGitHub-hosted T4; Metal + MCU-SoC + JTAG on
macos-latest-xlarge.ci.ymlis now a 129-line orchestrator. It passescode(docs-onlygate) and
build_resultintotest.ymlso a failed build surfaces as afailed required check (via each artifact job's explicit build-gate step)
rather than a silently-passing skip.
composite actions under
.github/actions/(setup-{cuda,hip,metal},init-submodules,download-jacquard), shared between build and test.Scope: faithful move
Each backend keeps its current test content (Metal its rich suite, CUDA/HIP
the shared
gpu_test_suite.sh). Unifying the batch across backends is a trackedfollow-up, not part of this PR — it would run new tests on CUDA/HIP for the
first time and needs GPU-runner triage.
Decisions baked in
synthis uniform on every artifact (published + test binaries).self-hosted
nvidia1reserved for perf.cuda-blackwellis non-gating —it skips (not fails) when the build didn't succeed, so an offline box never
blocks a merge.
mcu-soc-comparisongains
continue-on-errorso a CVC↔Metal mismatch is surfaced in the stepsummary without blocking merges.
Validation
Green on the first run — every job passed, including the artifact reuse
(one CUDA build → T4 + Blackwell), the new
cosim-cpuartifact-consume path,and backend equivalence:
https://github.com/gpu-eda/Jacquard/actions/runs/28785097079
The test jobs now run inside the reusable
test.yml, so their check names gaina
Test /prefix. The 7 currently-required checks must be renamed:LintTest / LintUnit TestsTest / Unit TestsMetal Tests (macOS)Test / Metal Tests (macOS)CUDA TestsTest / CUDA TestsHIP Tests (NVIDIA backend)Test / HIP Tests (NVIDIA backend)BenchmarksTest / BenchmarksMCU SoC Metal SimulationTest / MCU SoC Metal SimulationBecause this PR reports the new names, it can't satisfy the old required
checks — merge it via admin override, then immediately update the required set
(other in-flight PRs will pick up the new names on rebase).
Follow-ups (separate PRs, build on this)
gpu_test_suite.sh).release.ymlreuse ofbuild.yml→ publish Linux CUDA binaries; moverelease-metaloff self-hostedmacos-runner-1.nvidia1.