Skip to content
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] skip non-docs phases when a PR only modifies docs/ #8673

Closed
areusch opened this issue Aug 6, 2021 · 6 comments · Fixed by #9031
Closed

[CI] skip non-docs phases when a PR only modifies docs/ #8673

areusch opened this issue Aug 6, 2021 · 6 comments · Fixed by #9031

Comments

@areusch
Copy link
Contributor

areusch commented Aug 6, 2021

Right now it's really difficult to write docs because you're subjected to the standard 5-10 hour CI flow. This is completely unnecessary when just changing the docs site--we only need to do a GPU-aware build of TVM, then run the docs stage. docs depends on tutorials, which are executed against the GPU node.

my thinking is:

  • probably still run Sanity Check phase since there are some docs lint steps done there
  • in that phase, use the TVM checkout to decide whether the PR makes changes outside docs (e.g. git diff --name-only HEAD...origin/main or something like it (think Jenkins will have merged the PR into local main at this point)). Set a Jenkinsfile var based on this
  • do the GPU build
  • run the docs build

@mikepapadim will take a look at this

cc @leandron @denise-k

@comaniac
Copy link
Contributor

comaniac commented Aug 6, 2021

Thanks for bringing this up! I was thinking about this issue while ago but didn't take actions...
Another though is moving the docs building process from Jenkins to Github actions. In this case, we don't even need to use the CI resources when only changing docs.

@mikepapadim
Copy link
Contributor

Thanks for bringing this up! I was thinking about this issue while ago but didn't take actions...
Another though is moving the docs building process from Jenkins to Github actions. In this case, we don't even need to use the CI resources when only changing docs.

I think if it possible to move the CI to GH actions only for doc changes, it will remove a lot of overhead from the current Jenkins workers.

@areusch
Copy link
Contributor Author

areusch commented Aug 9, 2021

@comaniac Ah I should have said changes in docs and tutorials. We can definitely start with just docs for now to see how this works--if we expand the approach to tutorials, i think there are a few more wrinkles.

The main question is whether we can reliably reproduce the results of the CI on GH actions. Since the underlying machine will vary, and tutorials are executed as TVM code during the docs build, I favor to keep everything centralized (otherwise tutorials might output different results than you see on CI). On the other hand, I understand that if we're just limiting to docs changes, running Sphinx should produce the same warnings regardless of the host CUDA driver version and attached GPU hardware.

@comaniac
Copy link
Contributor

comaniac commented Aug 9, 2021

Oops I missed the tutorials. Yeah compiling tutorials requires specific machines, so we probably still need to use the Jenkins CI.

@mikepapadim
Copy link
Contributor

There is a straightforward way to do it. We could add the \doc directory, as well as specific file extensions (i.e., txt, md etc) with regex in the exclude paths of the Jenkins configuration.
image

This should be a first iteration until we go for something more complete to cover the cases where hardware is need.

@areusch
Copy link
Contributor Author

areusch commented Sep 9, 2021

the tricky thing is that we still do want to run some CI tasks--we just want to skip most of them. for example, you could checkin broken ReStructuredText--we should still fail the CI if you try to do this. So I think we do need to modify the Jenkinsfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants