-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[ci] Split Jenkinsfile into platform-specific jobs #13300
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
Conversation
|
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
|
This is great!! |
|
This is amazing. It'll make it so much easier to find failures, thanks a lot for this. |
|
Another great point about this PR is that now we can easily replicate only a part of the CI in a separate environment. For example, if someone wants to only run Hexagon tests or microTVM tests on physical devices, they could reuse the same Jenkins file for cortexm or hexagon. |
| args = parser.parse_args() | ||
|
|
||
| sources = TEMPLATES_DIR.glob("*jenkinsfile.groovy.j2") | ||
| changes = [update_jenkinsfile(source) for source in sources if source.name != "base.groovy.j2"] |
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.
Not sure if the if condition is necessary
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.
its just there to keep from copying base.groovy.j2 to the generated directory since it doesn't do anything outside of provide helper functions
| ) | ||
| skip_ci = should_skip_ci(env.CHANGE_ID) | ||
| skip_slow_tests = should_skip_slow_tests(env.CHANGE_ID) | ||
| rebuild_docker_images = sh ( |
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.
I can see rebuild_docker_images is set and never used in all the generated Jenkins files except the docker one. I don't think this is a particular issue at the moment. Even though it would be nice to have only the current image name used (ci_arm in this case).
However, it makes me wonder if having a separate job for building the docker images allows for a race between a job trying to pull a docker image and the docker_jenkisfile building a new docker image.
Should we maybe have instead each platform (arm, cpu, gpu ...) build its own image if needed?
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.
Right now the image build is just to check the build so it doesn't actually use them later on. We should definitely come in and try to clean this up some more later on since it's still a bit tangled up with the old monolithic job
| ) | ||
| } | ||
|
|
||
| stage('Docker Image Build') { |
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.
This seems to be outside of a method. Are we ok with that?
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.
As long as Jenkins doesn't blow up when running it's ok (the JVM has a 64k limit on method size or something so if there's too much generated code things need to be split up)
|
|
||
| cancel_previous_build() | ||
|
|
||
| prepare() |
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.
We could add a newline here
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.
The EOF-adjacent newlines get caught by https://github.com/apache/tvm/blob/main/tests/lint/whitespace.sh, so we can't really change them without adding an exception
areusch
left a comment
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.
thanks @driazati, couple questions but i agree with splitting these up
areusch
left a comment
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.
thanks @driazati a couple small last things
areusch
left a comment
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.
thanks @driazati !
|
thanks @driazati ! Great work! |
This is a follow on to tlc-pack/ci#58 and #13300. This removes the old `Jenkinsfile` and makes the new job statuses required for PRs to merge.
|
hi @driazati , It seems that the contents related to how to regenerate Jenkinsfile in |
Ah good catch, I will follow up with a PR to update the docs but you can run this to re-sync everything python3 -m pip install jinja2
python ci/jenkins/generate.py |
The PR apache#13300 had a bad merge with main an undid a fix from apache#13442, this adds it back in.
This breaks up the Jenkinsfile into ones for GPU, CPU, etc. This removes a false dependency between the build and test steps (e.g. before the GPU tests had to wait on the Hexagon build to complete) and makes the Jenkins UI a bit better since there's not 30 tests to scroll through to find a failure. An example can be found in my fork here: https://github.com/driazati/tvm/pull/38 in the checks box. Before this is merged https://github.com/tlc-pack/ci/blob/main/jenkins/jenkins-jobs/prod/tvm.yaml will need to be updated to accept webhooks from apache/tvm instead of my fork. See apache#13337 for more context
…he#13316) This is a follow on to tlc-pack/ci#58 and apache#13300. This removes the old `Jenkinsfile` and makes the new job statuses required for PRs to merge.
The PR apache#13300 had a bad merge with main an undid a fix from apache#13442, this adds it back in.
This breaks up the Jenkinsfile into ones for GPU, CPU, etc. This removes a false dependency between the build and test steps (e.g. before the GPU tests had to wait on the Hexagon build to complete) and makes the Jenkins UI a bit better since there's not 30 tests to scroll through to find a failure. An example can be found in my fork here: https://github.com/driazati/tvm/pull/38 in the checks box. Before this is merged https://github.com/tlc-pack/ci/blob/main/jenkins/jenkins-jobs/prod/tvm.yaml will need to be updated to accept webhooks from apache/tvm instead of my fork.
See #13337 for more context