-
Notifications
You must be signed in to change notification settings - Fork 33
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
Improve CI build time #145
Conversation
Codecov Report
@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 24.19% 20.68% -3.51%
==========================================
Files 7 7
Lines 682 672 -10
==========================================
- Hits 165 139 -26
- Misses 494 514 +20
+ Partials 23 19 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
face8ee
to
1e688cc
Compare
5257709
to
a144f9e
Compare
da397ef
to
3717f44
Compare
Instead of building binaries as part of the image build using QEMU we're crosscompiling using Go's native support which should be faster. Signed-off-by: Chris Doherty <[email protected]>
3717f44
to
866aaa6
Compare
eda910f
to
866aaa6
Compare
@Mergifyio queue |
Sorry but this command cannot run when the configuration is updated |
The CI took in excess of 15m to run per commit. This was largely due to environment emulation used to build binaries and docker images for the supported platforms and serial execution of validation tools.
This change set does the following:
go test
as a dedicated test job.setup-go
v3 caching feature.These changes results in an average build time reduction of roughly 600% from 19.5m to 3m (we should really think about using this setup across Tinkerbell).
To provide a sane local developer workflow the
make image
recipe has been updated to always build Linux binaries so it can be packaged into the final image. This means the binaries are no longer built in a container. Themake build
recipe is customizable using familiarGOOS
andGOARCH
variables defaulting to whatever your local platform is.We may consider improving this in the future to limit version skew but given the reliability of the Go toolchain and Go being the only real dependency it seems OK to use the host environment for now. If more developers begin contributing we may need to normalize environments.
Minor bits
images
job given that job can't run without its pre-req jobs (all other jobs).Closes #135