ci: consolidate per-arch engine builds into one matrix on build-engine.sh - #22
Draft
jwinarske wants to merge 2 commits into
Draft
ci: consolidate per-arch engine builds into one matrix on build-engine.sh#22jwinarske wants to merge 2 commits into
jwinarske wants to merge 2 commits into
Conversation
…e.sh
The four per-arch workflows each inlined the same depot_tools/gclient/gn/ninja/
prepare-sdk orchestration, differing only by arch, triple, and sysroot. Replace
them with a single matrix workflow that drives scripts/build-engine.sh — the
shared recipe (also consumed by emb and, next, a meta-flutter Yocto recipe), so
the orchestration lives in exactly one place.
- Add scripts/build-engine.sh: fetch (gclient sync) + build (patch -> gn ->
ninja -> prepare-sdk) phases; derives linux_cpu/triple/sysroot from the arch,
applies the per-arch patch series, and stages engine-sdk/. Validated locally
producing byte-comparable engines for x86_64/arm64/riscv64/armv7hf.
- Add patches/series-{default,riscv64}: the existing per-arch patch sets, with a
strip level so the recipe applies the same patches git apply reads today (no
patch files changed).
- flutter-engine.yaml matrix builds all arches x their modes (arm64/armv7hf/
x86_64: debug/debug-unopt/profile/release; riscv64: debug/profile/release),
preserving the exact linux-engine-sdk-<mode>-<arch>-<srcrev> tag names and the
draft/upload release flow.
Signed-off-by: Joel Winarske <joel.winarske@linux.com>
workflow_dispatch only works once a workflow is on the default branch, so add a branch-scoped push trigger (default srcrev, release=false) to exercise this on the adoption branch. Revert this commit before merging. Signed-off-by: Joel Winarske <joel.winarske@linux.com>
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.
Summary
Replaces the four per-arch workflows (
flutter-engine-{arm64,armv7hf,riscv64,x86_64}.yaml) — each of which inlined the same depot_tools → gclient → gn → ninja → prepare-sdk orchestration, differing only by arch/triple/sysroot — with one matrix workflow driving a sharedscripts/build-engine.sh. That recipe is the single source of truth also consumed byemb(and, next, ameta-flutterYocto recipe), so the engine-build orchestration lives in exactly one place.Changes
scripts/build-engine.sh—fetch(gclient sync) +build(patch → gn → ninja → prepare-sdk) phases. Deriveslinux_cpu/triple/sysroot from the arch, applies the per-arch patch series, and stagesengine-sdk/. Validated locally producing engines for x86_64, arm64, riscv64, armv7hf (byte-comparable to the currently published SDKs).patches/series-{default,riscv64}— the existing per-arch patch sets, expressed as a series with a strip level so the recipe applies exactly the patchesgit applyreads today. No patch files were changed..github/workflows/flutter-engine.yaml— matrix over the four arches × their modes (arm64/armv7hf/x86_64:debug/debug-unopt/profile/release; riscv64:debug/profile/release). Preserves the exactlinux-engine-sdk-<mode>-<arch>-<srcrev>tag names and the draft/create/upload/publish release flow.workflow_dispatchbefore mergeThe recipe is validated locally, but the CI wiring hasn't run on meta-flutter's self-hosted runners. Before this replaces the working release pipeline, please dispatch it against a known
srcrev(withrelease: false) and confirm:0001-clang-toolchain.patch— it patchesbuild/toolchain/custom/BUILD.gn, which recent engine commits already ship, so it may be obsolete for current srcrevs (it would then fail to apply). The series preserves the current set; a dispatch confirms it still applies to the commit you build. If it's obsolete, drop it from the series files.debug-unoptout-dir (linux_debug_unopt_<cpu>) staging.Once a dispatch is green, flip to ready and merge.