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.
We call the builds by passing
--platforms
to thedocker buildx build
, whether directly or via the GitHub actiondocker/build-push-action
.Either way, this causes it to run every command under qemu, so that non-native builds take about 4-5x as long as the native ones. See a typical build and issue #257 .
This proposes to fix the biggest problem, i.e. those emulated builds. Instead of emulating the entire process, this will run the actual build (as well as
go mod download
and every other step except for image assembly) on the native platform, but cross-compiling.Local tests show that the result is that building for both native and alternate platforms are within a few percentage points of each other. We will let CI run here and see what it reports.