-
Notifications
You must be signed in to change notification settings - Fork 398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🌱 Cross-compile container image binaries from host platform #2551
🌱 Cross-compile container image binaries from host platform #2551
Conversation
b568979
to
287a0f7
Compare
/retest |
pull_request: | ||
branches: | ||
- main | ||
- 'release-*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be inclined to keep it, so as to guarantee PRs do not break the image build for some reasons. In that case, the image is only built, not pushed, which I think is what we want for PRs:
kcp/.github/workflows/kcp-image.yaml
Line 54 in c14bdee
push: ${{ github.event_name != 'pull_request' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With 21min it is much faster now. So I am less concerned this blocks our github action queue.
Nice improvement. |
/retest |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Flake #2501 |
Summary
The compilation of the binaries in the builder stage of the container image is very slow when QEMU is used:
This PR switches to using Golang cross-compilation instead of QEMU, by forcing the builder stage to run the same platform as that of the host one, that gives:
It also triggers the image build workflow on pull requests, so non-regression of the container image build is covered, though the result image is not pushed to any registry.