ci: multi-arch-test-build: split matrix build into two stages#128
Draft
BKPepe wants to merge 1 commit into
Draft
ci: multi-arch-test-build: split matrix build into two stages#128BKPepe wants to merge 1 commit into
BKPepe wants to merge 1 commit into
Conversation
Refactor the `multi-arch-test-build.yml` workflow to execute the architecture build matrix in two sequential stages to optimize CI resource usage. - Create a new sub-reusable workflow `reusable_test_build_single.yml` to encapsulate the build, packaging, metadata generation, and Docker runtime test steps for a single architecture. - Modify `multi-arch-test-build.yml` to replace the single `build` job with three distinct jobs: - `build_custom`: Runs if a custom matrix is supplied by the caller (keeping full backward compatibility). - `build_early`: Acts as a smoke test by running three initial architectures (aarch64_generic, arm_cortex-a9_vfpv3-d16, powerpc_8548). - `build_remaining`: Runs the remaining 7 architectures only if the early stage builds successfully (`needs: build_early`). This ensures that if any of the core architectures fail to build or pass tests, the remaining jobs in the matrix are not scheduled, saving workflow runners. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Failed checksIssues marked with an ❌ are failing checks. Commit ec58837
For more details, see the full job log. Something broken? Consider providing feedback. |
|
FWIW I think this is a good idea. I've not worked enough with GHA to comment on the actual workflows until I can spend a good amount of time on it, but the have three 'canary' archs in parallel that gate the rest of the archs looks good. |
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.
This tries to implement the idea from @champtar and @hauke in this pull request openwrt/packages#29410 (comment). It first runs on 3 architectures, and if they succeed, it proceeds with the rest. This selection covers aarch64 (where fPIC was most affected in the past), armv7 (as a 32-bit ARM representative), and powerpc (where Go packages are not supported).
The main benefit is that instead of triggering the whole heavy machinery for all packages at once, we initially limit it to a few architectures. If those pass, the rest are triggered. For users on architectures other than the first three, the total build time might increase by dozens of minutes or even hours, but it will significantly save runner capacity and time if the build fails early.
It will certainly be interesting to see how this impacts the main OpenWrt repository. Note that I am still keeping a custom matrix for certain repositories such as LuCI, where packages are compiled only for x86_64.
For now, I want to test this first to verify it works as expected. This PR is currently meant more as a discussion starter on whether this approach makes sense.
I also recall that @hnyman was looking for or requesting something similar.