ci: run Bazel earlier#7732
Conversation
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
| node { | ||
| stage('Setup Bazel Build') { | ||
| checkout scm; | ||
| sh label: 'Setup Docker Image', script: 'docker build -f docker/Dockerfile.bazel -t openroad/bazel-ci .'; |
There was a problem hiding this comment.
Don't build docker image here, use prebuilt image. This will cut down the time it takes to start a docker build with several minutes. Added as a task to #7568
There was a problem hiding this comment.
In our CI, this takes less than 1 min. The last three builds were 57s, 47s, and 44s. We can use prebuilt, but I don't think it is a high priority. The breakdown of the runtime is ~1 min to provision the VM, ~2 min to checkout the code (this can be improved with shallow clone, I will give it a try as is low effort), ~1 min to build the image and 7+min to run the bazelisk test [...]
There was a problem hiding this comment.
I guess we'll whittle away at the things that move the needle and then eventually this sort of thing would come to the top of the list... That these quicker things start to matter in terms of time to failed CI and successful Bazel build is a good problem to have.
|
|
||
| RUN curl -Lo bazelisk https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 \ | ||
| && chmod +x bazelisk \ | ||
| && mv bazelisk /usr/local/bin/bazelisk |
There was a problem hiding this comment.
Refinement for later: download .bazelversion here. #7568
There was a problem hiding this comment.
How often do you see this being updated? If it is somewhat often, I would say to wait until we have the prebuilt image set up to automatically update; otherwise, it will require manual steps to update, which is not ideal.
There was a problem hiding this comment.
Low priority, listed more as an observation here.
| && apt-get -y install --no-install-recommends \ | ||
| build-essential \ | ||
| clang \ | ||
| containerd.io \ |
There was a problem hiding this comment.
We should be building within seconds and minutes for bazel, so small things will matter...
Refinement for later: simplify docker image. #7568
There was a problem hiding this comment.
All the current packages are required to run the tests. I iterated over adding one package at a time and checking the error from bazelisk test [...]. Unless we can move the dependencies into Bazel itself, these are the minimal requirements as far as I can tell.
oharboe
left a comment
There was a problem hiding this comment.
Merge: excellent starting point for further discussion, improvements and priortirization.
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Approx. 10 min TAT for Bazel: ~2-3 minutes for setup and ~7-8 minutes to run tests w/cache enabled.