-
Notifications
You must be signed in to change notification settings - Fork 238
CI: Add doc-only support to skip tests and non-essential builds #1478
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
|
/ok to test a668a04 |
This comment has been minimized.
This comment has been minimized.
|
/ok to test a668a04 |
|
/ok to test 87e17f5 |
TestingTo test this, I made the draft PR title
Cosmetic issue: Skipped jobs display with unexpanded variables in the GitHub UI (e.g., Then, I removed |
When a PR title contains [doc-only], the CI will: - Skip linux-aarch64 and windows builds - Skip all test jobs (linux-64, linux-aarch64, windows) - Keep linux-64 build (required for docs) - Keep doc build and deployment This allows faster iteration on documentation-only changes without waiting for the full test matrix to complete. Closes NVIDIA#1350
87e17f5 to
a5d6651
Compare
|
/ok to test a5d6651 |
|
/ok to test cb34189 |
rwgk
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.
Awesome
|
/ok to test 4eba160 |
| - linux-64 | ||
| name: Test ${{ matrix.host-platform }} | ||
| if: ${{ github.repository_owner == 'nvidia' }} | ||
| if: ${{ github.repository_owner == 'nvidia' && !fromJSON(needs.should-skip.outputs.doc-only) }} |
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.
Q: If it's doc-only, we don't need to run tests, so I think this change can be dropped. We currently do not run doctest anyway (we probably should, but it is not easy to set up).
My main concern is that we ignore the warnings across this file that require jobs to be kept in sync. (We manually split them and violated DRY so as to gain parallelism in the CI.)
| if ${{ needs.doc.result == 'cancelled' }}; then | ||
| exit 1 | ||
| else | ||
| exit 0 | ||
| fi |
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.
nit: can we move this to as an else block below?
| echo "skip=${skip}" >> "$GITHUB_OUTPUT" | ||
| echo "doc_only=${doc_only}" >> "$GITHUB_OUTPUT" | ||
| # WARNING: make sure all of the build jobs are in sync |
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 guess this particular job needs to stay intact. Let's update this warning to explain why it's out of sync from other build jobs below.
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.
Does "in sync" here mean the code blocks follow a parallel structure?
|
Summary
[doc-only]tag support in PR titles to skip test jobs and non-essential buildsChanges
should-skipjob to detect[doc-only]in PR titlesbuild-linux-aarch64,build-windows) to skip when[doc-only]is present[doc-only]is presentchecksjob to not fail when tests are intentionally skippedTest plan
[doc-only]in titlebuild-linux-64anddocjobs still runchecksjob passes despite skipped tests[doc-only]and verify normal CI behaviorCloses #1350