feat: improve parallelization in github workflows and Makefile#2436
Open
feat: improve parallelization in github workflows and Makefile#2436
Conversation
The primary goals of this PR are:
* Better parallelization for github workflows and local builds
* Allow easily running the github workflows locally
Changes:
* Makefile now describes dependencies among targets to enable parallel jobs
* Created `release` target to be called from the release workflow
* Creates temporary build folders to isolate symlinks
* Created `release-test` target to be called form the test workflow
* Makefile now has a release target which will concurrently build all 4 archives
* Added -j flag to Makefile so it may create multiple jobs
* This should leverage all cpus 4 cpu machines we will build on
* I've made the arch explicit (GOOS=amd64) for x86 binary for safety
* For now I've preserved the existing targets for "make build" and "make build-strip", but ideally:
* `make build` only builds using `CGO_ENABLED=0 go build` giving native
arch for local dev.
* `make release` builds all the release binaries, without any env defined
values such as `CGO_ENABLED=0 go build` (it is currently doing this now)
* I've collapsed the test workflows into one step so they can run concurrently
One note is that the go tool chain does make use of multiple cpus. But there
should still be measurable benefits on 4 cpu machines with these changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The primary goals of this PR are:
Changes:
releasetarget to be called from the release workflowrelease-testtarget to be called form the test workflowmake buildonly builds usingCGO_ENABLED=0 go buildgiving native arch for local dev.make releasebuilds all the release binaries, without any env defined values such asCGO_ENABLED=0 go build(it is currently doing this now)One note is that the go tool chain does make use of multiple cpus. But there should still be measurable benefits on 4 cpu machines with these changes.
Related:
#2429