refactor(ci): build oab once per arch, fan out packaging#1242
Merged
Conversation
…kaging Previously, all 30 matrix jobs (15 agents × 2 architectures) each ran a full Docker multi-stage build that compiled the Rust binary from source. Even with GHA cache, the builder stage was duplicated across 30 separate cache scopes. This refactor: - Adds a 'compile' job (2 parallel: amd64 + arm64) that builds openab, openab-agent, and agy-acp binaries and uploads as artifact - Introduces Dockerfile.package that copies pre-built binaries (COPY --from=bins) instead of compiling from source - The 'build' matrix jobs now only do lightweight image packaging (install agent CLI + copy binary), no Rust compilation
This comment has been minimized.
This comment has been minimized.
Collaborator
Author
|
LGTM ✅ — Clean separation of compile and packaging stages reduces redundant Rust builds from 30 to 2. What This PR DoesThe pre-beta-build workflow previously ran 30 Docker multi-stage builds, each compiling the How It Works
Findings
Baseline Check
What's 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.
Summary
Refactors the pre-beta-build workflow to compile the
oabbinary once per architecture (2 jobs), then fan out lightweight packaging jobs that only install agent CLIs and copy the pre-built binary.Before: 30 matrix jobs each ran a full Docker multi-stage build including Rust compilation (even with GHA cache, the builder layers were duplicated across 30 separate cache scopes).
After: 2 compile jobs + 30 lightweight packaging jobs (no Rust). Net result: faster builds, less GHA cache pressure, clearer separation of concerns.
Options Considered
scope=pre-beta-builder-<arch>across all agent buildsdocker build --target builder, push, then use--build-arg BUILDER_IMAGE=...in agent jobsWhy Option 2
Changes
.github/workflows/pre-beta-build.yml— addedcompilejob, refactoredbuildjob to use pre-built binariesDockerfile.package— new lightweight Dockerfile that usesCOPY --from=bins(nobuilderstage)Testing