-
Notifications
You must be signed in to change notification settings - Fork 262
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
[CI] improve the ci efficiency by parallelizing the build tasks #398
[CI] improve the ci efficiency by parallelizing the build tasks #398
Conversation
Tested on local mac machine, reduced about 40% docker building time. However, based on online Integration Test, there is no performance gain. |
Makefile
Outdated
@@ -133,7 +133,8 @@ define push_image | |||
endef | |||
|
|||
.PHONY: docker-build-all | |||
docker-build-all: docker-build-controller-manager docker-build-plugins docker-build-runtime docker-build-users ## Build all docker images | |||
docker-build-all: ## Build all docker images in parallel |
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.
did you try to use make -j4
here?
there's another option leverage the matrix to increase the parallelisme
|
Please help write the PR description and linked issue. check #205 as an example |
No performance gain for online integration test? |
No, thanks for finding this typo. Will try some new ideas as Jiaxin suggested. |
1baa693
to
814b189
Compare
690bc5b
to
b1aa5cd
Compare
The matrix approach works after some dependency modification! Now, we are able to have 4 runners to build images in parallel. The overall test time reduced 1/3 (from ~9m to ~6m) |
path: ${{ matrix.image }}.tar | ||
retention-days: 1 | ||
|
||
installation-test: |
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.
em. are those images not visible to further loading process? is artifact upload required?
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.
In the previous version, we only used 1 runner and we don't need upload and download steps. However, we use 5 runners in total (the first 4 runners to build images and the last runner to run the installation test) and that's why we need upload process for the first four runners and the download process for the last runner.
93a297a
to
5e5c7d5
Compare
5e5c7d5
to
3b70b6e
Compare
improve-the-ci-efficiency-by-parallelizing-the-build-tasks
Pull Request Description
In the initial version, we do not care the efficiency that much and we use single runner to build the images one by one.
In this PR, we create four runners to build images in parallel and then use another runner to conduct tests.
Related Issues
Resolves: #[128]