-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Use faster build for the default minikube target #5749
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: afbjorklund 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 |
Codecov Report
@@ Coverage Diff @@
## master #5749 +/- ##
=======================================
Coverage 36.58% 36.58%
=======================================
Files 110 110
Lines 8096 8096
=======================================
Hits 2962 2962
Misses 4745 4745
Partials 389 389 |
@minikube-bot OK to test |
That's a really impressive improvement. I look forward to merging this :) |
the mac os test failures I seen on other PRs, not related to this PR |
Need to add at least |
When we are doing the "cross" compile targets, we force rebuilding all packages (up-to-date or not). For the default native target "out/minikube", we can do a much faster build (10x!), for development. Leaving all the cross target to rebuild, as before. Also the _test.go files are only used for unit tests.
When not rebuilding everything all the time, we need to check the go.mod for changes to the list of dependencies (and rebuild).
Since the docker image is always running Linux amd64, we need to pass the actual local target to build (cross-compile) minikube for.
f2d0bcf
to
e5c4720
Compare
Also had broken the default build in Docker, i.e. |
Old binary: [177.933725752 182.630983241 192.264802579] |
afbjorklund please merge this when you feel ready ! |
When we are doing the "cross" compile targets, we
force rebuilding all packages (up-to-date or not).
For the default native target "out/minikube", we
can do a much faster build (10x!), for development.
Leaving all the cross target to rebuild, as before.
Also the _test.go files are only used for unit tests.
On my machine it takes about 50 seconds, to rebuild all the 645 packages...
Doing an incremental build takes only 6 seconds, and is much more usable.
Interesting flags to
go build
:I used -v to get the 645 lines.