Skip to content

ci: one ARM build pipeline shared by release and canary - #137

Merged
GLinnik21 merged 2 commits into
mainfrom
ci/reusable-build
Sep 19, 2026
Merged

GLinnik21 merged 2 commits into
mainfrom
ci/reusable-build

Conversation

@GLinnik21

Copy link
Copy Markdown
Collaborator

Summary

  • Extracted the ARM build+verify job into a new reusable workflow, .github/workflows/build-package.yml (on: workflow_call), parameterized by flavor, telemetry, and optional steps (Homebrew manifest, LGPL source asset, caches, firmware-database gate).
  • release.yml's build job and canary.yml's build job are now thin callers into it instead of two hand-kept copies of the same pipeline.
  • The wrong-flavour guard and the source-asset step's .ipk lookup are now derived from make -s print-appid instead of a hard-coded stable id, so a future non-stable caller (a coming nightly flavour) is checked correctly without a third copy of the job.
  • canary.yml gains a dry_run dispatch input that skips publish entirely, so the shared pipeline can be proven end to end on a branch without publishing anything.
  • Updated the two doc/comment sentences a claim audit found gone stale: release.yml's "TWO TRAPS" header comment and docs/distribution.md's --no-default-features assertion note now name build-package.yml where the step actually lives.

Behaviour

  • Release path is unchanged: verified against origin/main with a command-coverage script — every one of the 90 non-comment shell command lines in the old release.yml build job is still present verbatim in build-package.yml, in the same relative order. The only two differences are intentional: the wrong-flavour guard and the source-asset ipk=$(ls ...) lookup, both switched from a hard-coded com.beb.plxnative glob to the appid make -s print-appid derives.
  • Canary path: every existing assertion is preserved. Two small, deliberate behaviour changes:
    • the build job's checkout no longer forces fetch-depth: 0 (nothing in the build steps — check-package.py, check-elf.sh, prepare-source-release.py, fwcompat.py, rust-modules/build.rs — reads git history; build.rs explicitly avoids git state so it stays correct in a tarball/detached-HEAD checkout);
    • RUST_NIGHTLY for the ARM build now comes from build-package.yml's own vars.RUST_NIGHTLY || 'nightly-2026-07-02' fallback instead of a value hard-coded in canary.yml (same date today; host-checks keeps its own separate pin for the host-side checks).
    • the webosbrew gen-manifest tool is now installed unconditionally alongside fw-symbols/ipk-verify (harmless — canary never invokes it, since homebrew-manifest defaults to false).

How it is proven

  • actionlint on all three workflows: clean, aside from one pre-existing SC2001 style finding in release.yml's untouched prepare job (confirmed present on origin/main too, unrelated to this change).
  • A command-coverage script diffing every run: line in origin/main's release.yml build job against build-package.yml: 90/90 lines present, same relative order, with only the two intended print-appid-based replacements noted above.
  • Not yet run: a canary dispatch with dry_run: true from this branch, to prove the shared pipeline builds and gates end to end with nothing published. That is the natural next step before merging.

🤖 Generated with Claude Code

Extract the ARM build+verify job release.yml and canary.yml each hand-kept
a copy of into a new reusable workflow, .github/workflows/build-package.yml,
parameterized by flavor, telemetry pair, and which optional steps (Homebrew
manifest, LGPL source asset, caches, firmware-database gate) apply.

The release path runs the exact same commands as before (90/90, verified by
a command-coverage script against origin/main): the only two changes are the
wrong-flavour guard and the source-asset step's ipk lookup, both now derived
from `make -s print-appid` instead of a hard-coded stable id, so a future
non-stable caller is checked correctly too.

canary.yml gains a `dry_run` dispatch input that skips `publish` so the
shared pipeline can be proven on a branch without publishing anything.

This also prepares the coming nightly caller, which needs no new copy of
the job — just another set of inputs.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 18, 2026 22:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The new reusable workflow references hyphenated inputs via dot syntax (likely mis-parsed in Actions expressions), and its workflow_call defaults/secret requirements don’t match actual runtime behavior.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 2 Medium severity

Open (4)
What changed in this PR

This PR refactors the ARM build+verify GitHub Actions pipeline into a single reusable workflow (.github/workflows/build-package.yml) and updates both release and canary workflows to call into it, reducing drift between the two packaging paths.

Changes:

  • Added a reusable build-package.yml workflow (workflow_call) encapsulating ARM build, packaging, and gating steps.
  • Updated release.yml and canary.yml to delegate their ARM build jobs to the shared workflow (and added a dry_run input to canary to skip publish).
  • Updated docs/tooling text to reference the new shared workflow location.
File Description
docs/​distribution.md Updates CI/release documentation to reference build-package.yml as the shared ARM pipeline.
ci/​gen-release-audit.py Updates the release audit “built by” row to mention build-package.yml being invoked by the release workflow.
.github/​workflows/​release.yml Replaces the inlined ARM build job with a call into the reusable build-package.yml.
.github/​workflows/​canary.yml Replaces the inlined ARM build job with a call into build-package.yml and adds dry_run to skip publishing.
.github/​workflows/​build-package.yml Introduces the shared reusable ARM build+verify workflow with optional gates/steps.
.agents/​skills/​cut-release/​SKILL.md Updates release process guidance to reflect the new shared workflow call site.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +81 to +84
FLAVOR: ${{ inputs.flavor }}
TELEMETRY: ${{ inputs.telemetry }}
HOMEBREW_MANIFEST: ${{ inputs.homebrew-manifest }}
run: |
Comment on lines +392 to +396
# The tarball is the pristine upstream one build-ffmpeg.sh already downloaded and verified
# against a pinned sha256 — no patches are applied, so this IS the corresponding source.
if: inputs.source-asset
run: |
set -euo pipefail
Comment on lines +43 to +48
source-asset:
description: >
Attach the LGPL corresponding source for the bundled FFmpeg and build the versioned,
independently-reconstructible source tarball. Release only — canary never had these.
type: boolean
default: true
Comment thread .github/workflows/build-package.yml Resolved
…-closed default

Make the workflow_call contract match reality (every caller's upload step
hard-fails without SENTRY_AUTH_TOKEN), and document why source-asset
defaults true: any publisher of the package owes LGPL source, not just release.

Co-Authored-By: Claude Opus 5 <[email protected]>
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