Repository navigation
Conversation
Build the Go binary on the build platform and cross-compile for the target (cgo with gcc-aarch64-linux-gnu for arm64, as the release binaries do), so multi-platform image builds no longer compile under QEMU. Run the version sanity check in the runtime stage, where it now fails the build if the binary can't run. promrated has no cgo deps, so it cross-compiles with CGO_ENABLED=0 into an alpine runtime stage. category: refactor ticket: none
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4802 +/- ##
==========================================
- Coverage 67.61% 67.60% -0.01%
==========================================
Files 254 254
Lines 33609 33609
==========================================
- Hits 22725 22723 -2
- Misses 10883 10885 +2
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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.



The arm64 leg of the docker build compiled charon (including herumi bls via cgo) under QEMU, which dominates build-push-deploy time (median 22 min, p90 71 min over the last 100 runs).
The builder stage now runs on
$BUILDPLATFORMand cross-compiles for$TARGETARCH, installinggcc-aarch64-linux-gnu/libc6-dev-arm64-cross(or the amd64 equivalents on an arm64 host) and settingCC, asbuild-release-binaries.ymlalready does for the arm64 release binary. Build flags are unchanged (dynamic glibc binary,GO_BUILD_FLAGpassed through). Thecharon versionsanity check moves to the runtime stage so it runs on the target arch, and it now fails the build if the binary doesn't run. QEMU stays for the runtime stage's small RUN steps; runners are unchanged.promrated has no cgo deps, so it cross-compiles with
CGO_ENABLED=0and its runtime stage isalpine:3.24instead of the full golang image.Verified locally:
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build .produces an AArch64 binary needing GLIBC_2.34 with herumi linked. First CI run's runtime-stagecharon version(under QEMU) is the end-to-end check.Unrelated, noticed: promrated pushes have failed since August because Docker Hub tag immutability rejects
obolnetwork/promrated:latest.category: refactor
ticket: none