Skip to content

ci: matrix expansion + 7-phase split + node24 actions bump#277

Merged
F5OEO merged 3 commits intoF5OEO:futurefrom
gretel:pr/ci-matrix-phased
Apr 20, 2026
Merged

ci: matrix expansion + 7-phase split + node24 actions bump#277
F5OEO merged 3 commits intoF5OEO:futurefrom
gretel:pr/ci-matrix-phased

Conversation

@gretel
Copy link
Copy Markdown

@gretel gretel commented Apr 9, 2026

Three sequential improvements to .github/workflows/main.yml: cover the mini variants in CI, split the monolithic build log into phases for faster triage, and refresh action versions off the Node 20 deprecation warning.

Three-commit series:

  1. ci: include fishball_mini variants in default build matrix — adds fishball_mini and fishball_mini_7020 to the matrix (plutoskyr2 already present from upstream ee6c27a).
  2. ci: split monolithic build into 7 phased steps for triage — rewrites the prepare job to emit an include:-form matrix with {board, defconfig} pairs. Splits the single Build step into 7 phases (fetch, configure, sources, toolchain, kernel+uboot, userspace+rootfs, image). ~10 s/board overhead; failures now point at a single phase in the GitHub Actions UI.
  3. ci: bump actions to node24, streamline job name, gate release on tag pushactions/checkout v4 -> v6, actions/cache v4 -> v5, actions/upload-artifact v4 -> v7, actions/download-artifact v4 -> v8, free-disk-space @main -> @v1.3.1. Adds name: build (${{ matrix.defconfig }}) override. Switches release publishing from workflow_dispatch to tag push only (manual dispatch produces artifacts without publishing).

Matrix CI: 12/12 boards build green.

@gretel gretel marked this pull request as ready for review April 9, 2026 15:38
@gretel gretel force-pushed the pr/ci-matrix-phased branch 2 times, most recently from a868582 to bb070bd Compare April 16, 2026 02:11
gretel added 3 commits April 16, 2026 23:39
upstream ee6c27a already added plutoskyr2 to the build matrix as a
single-board extension.  This commit additionally enables the two mini
variants (fishball_mini, fishball_mini_7020) which exist as defconfigs
in configs/ and are supported by build.sh but were excluded from the
CI matrix to save runner time.

Current GitHub Actions runner budget for the public-repo tier lets all
12 boards run in parallel with no wall-clock penalty, so the previous
"save runner time" rationale no longer applies.  Exercising mini
variants in CI catches defconfig regressions early.  The plutoskyr2
entry from ee6c27a is preserved; this commit is strictly additive.

Signed-off-by: Tom Hensel <[email protected]>
Each board's build job currently wraps the entire buildroot invocation
in a single 100 KLoC / ~17 MB workflow step.  Triage of any failure
requires scrolling through the whole log because the failure mode
(mirror down, kconfig regression, toolchain extraction, kernel/U-Boot
patch issue, target package cross-compile, post-image script) is
indistinguishable in the GitHub Actions UI.

Split the single Build step into 7 discrete phases, each invoking a
single buildroot make target.  Buildroot's dependency tracking means
running them in sequence is equivalent to one `make` invocation; the
~10 sec per board overhead from re-parsing the makefile tree is
acceptable for the triage gain:

  1. Fetch Buildroot tree     - getbuildroot.sh, isolates upstream mirror
  2. Configure <board>        - make <defconfig>, isolates kconfig errors
  3. Download package sources - make source, isolates network/hash issues
  4. Build toolchain          - make toolchain, isolates extraction
  5. Build kernel and U-Boot  - make linux uboot, kernel + U-Boot focus
  6. Build userspace + rootfs - make target-finalize, bulk package builds
  7. Assemble image           - make all + post-image, image assembly

Each step's failure mode is distinct from its neighbours; collapsing
any two would lose triage signal.  The biggest single step post-split
is "Build userspace + rootfs" at ~50K lines, down from ~100K lines
today, and concentrates on the highest-signal failures (target package
cross-compile, kernel modules, maia-httpd Rust build).

Also restructure the matrix to use the include: form so each entry
carries its own defconfig as a matrix field instead of relying on a
runtime lookup against build.sh's BOARDS[] map.  This eliminates the
shell-parse-the-other-script anti-pattern while keeping build.sh as
the single source of truth for local builds.  The board name to
defconfig mapping is now duplicated between build.sh (for manual
builds) and the workflow's prepare step (for CI); these must stay in
sync, but the duplication is small and lint-checkable.

Job-level env: block hoists BR2_DL_DIR and OUTPUT_DIR out of every
phase so the per-phase steps stay terse and uniform.

actionlint clean.  Hardware-validated workflow structure: matches the
exact phase ordering buildroot uses internally when invoked via the
default `all` target.

No functional change to the build output: the same tezuka.zip artifact
is produced for each board, and the release job is unchanged.

Signed-off-by: Tom Hensel <[email protected]>
…push

Three related improvements to the build workflow:

1. Bump action versions to address the Node.js 20 deprecation warning.
   All four @actions/* dependencies now use the latest majors, which
   ship on node24:
   - actions/checkout@v4     -> @v6
   - actions/cache@v4        -> @v5
   - actions/upload-artifact@v4 -> @v7
   - actions/download-artifact@v4 -> @v8

   jlumbroso/free-disk-space was pinned to the floating @main ref;
   switch to the immutable @v1.3.1 tag for reproducibility.  No
   behavioural change expected.

2. Override the matrix job display name to show only the defconfig.
   The previous default ("build (board, defconfig)") repeated the same
   identifying information twice, since defconfig uniquely determines
   the board.  Use jobs.build.name to show "build (<defconfig>)" in
   the Actions UI while keeping board as an internal matrix field for
   cache keys, OUTPUT_DIR, and artifact naming.

3. Switch releases to tag-push-gated pre-releases.  Previously every
   workflow_dispatch run created a stable GitHub Release, which
   polluted the release stream with smoke-test builds.  Now:

   - Tag pushes matching 'v*' trigger the full matrix build AND
     publish a pre-release tagged with the ref.  Artifacts are named
     tezuka-<board>-<tag>.zip and attached to the release.
   - workflow_dispatch still builds the matrix (for smoke testing)
     but the release job is gated on event_name == 'push' and a
     refs/tags/ ref, so manual dispatch does not publish.
   - The 'version' input on workflow_dispatch is removed; dispatch
     runs are identified by run-name "Test build (<boards>)" and
     tagged runs by "Release <tag>".

   The release packaging logic strips the -<rev7> suffix from the
   per-board artifact directory name (e.g. tezuka-fishball7020-a9b5665)
   and repackages as tezuka-fishball7020-v0.3.0.zip so the zip name
   matches the published asset name.  Tested locally against four
   representative board names including fishball_mini_7020 and
   plutoskyr2 to confirm the shell-parameter-expansion board
   extraction handles underscore-containing names correctly.

No functional change to the build itself; this is pure CI plumbing.
actionlint clean.

Signed-off-by: Tom Hensel <[email protected]>
@gretel gretel force-pushed the pr/ci-matrix-phased branch from bb070bd to 553ce9f Compare April 16, 2026 21:39
@F5OEO F5OEO merged commit b7087a8 into F5OEO:future Apr 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants