-
Notifications
You must be signed in to change notification settings - Fork 168
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
buildx: speed the language having builtin build #230
Conversation
Time to make gm image for linux/arm64 in github action(amd64 machine) from 706s => 127s. before: Publish Docker Images before cross build speed , total
after: Publish Docker Images after cross build speed, total
|
/assign @JimmyYang20 |
We use docker-buildx to build our components images for different platforms. But for some languages, such as golang, have good builtin build for multi platforms, and buildx support that. In Sedna, we have GM/LC written by golang. This commit supports this function. Signed-off-by: llhuii <[email protected]>
8efcaac
to
d629f43
Compare
/hold
|
Because LC has built sqlite3 which requires CGO with CGO_ENABLED=1, and CGO can't support cross-compilation, this speed improvement can't used in LC. Signed-off-by: llhuii <[email protected]>
e6de43d
to
88508f8
Compare
Add a tag '_speed_buildx_for_cgo_alpine' for Dockerfiles: 1. require golang with CGO_ENABLED=1 2. use alpine image. So used in 'build/lc/Dockerfile' Signed-off-by: llhuii <[email protected]>
88508f8
to
afdd6a2
Compare
/hold cancel
|
In the commit, it dynamically downloads the corresponding platform cross compiler in Dockerfile. In future, we may build a image dedicated to build/cross-build for golang, then base it to do cross build. |
Tested push-images, finished in 32 min |
/cc Poorunga |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: llhuii 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 |
Add more debug info:
|
We use docker-buildx to build our components images for different
platforms.
But for some languages, such as golang, have good builtin build for
multi platforms, and buildx support that.
In Sedna, we have GM/LC written by golang. This commit supports this
function.
Signed-off-by: llhuii [email protected]