Skip to content

Conversation

@Andy-Jost
Copy link
Contributor

@Andy-Jost Andy-Jost commented Jan 13, 2026

Summary

  • Adds [doc-only] tag support in PR titles to skip test jobs and non-essential builds
  • Allows faster iteration on documentation-only changes

Changes

  • Modified should-skip job to detect [doc-only] in PR titles
  • Updated build jobs (build-linux-aarch64, build-windows) to skip when [doc-only] is present
  • Updated test jobs to skip when [doc-only] is present
  • Updated checks job to not fail when tests are intentionally skipped

Test plan

  • Verify test jobs are skipped with [doc-only] in title
  • Verify build-linux-64 and doc jobs still run
  • Verify checks job passes despite skipped tests
  • Remove [doc-only] and verify normal CI behavior

Closes #1350

@Andy-Jost Andy-Jost added enhancement Any code-related improvements cuda.core Everything related to the cuda.core module labels Jan 13, 2026
@Andy-Jost Andy-Jost self-assigned this Jan 13, 2026
@Andy-Jost Andy-Jost requested a review from leofang January 13, 2026 22:23
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Jan 13, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@Andy-Jost
Copy link
Contributor Author

/ok to test a668a04

@github-actions

This comment has been minimized.

@Andy-Jost Andy-Jost changed the title [doc-only] CI: Add doc-only support to skip tests and non-essential builds CI: Add doc-only support to skip tests and non-essential builds Jan 14, 2026
@Andy-Jost
Copy link
Contributor Author

/ok to test a668a04

@Andy-Jost
Copy link
Contributor Author

/ok to test 87e17f5

@Andy-Jost
Copy link
Contributor Author

Testing

To test this, I made the draft PR title [doc-only] CI: Add doc-only support... and ran CI. The results were as expected:

  • build-linux-64 ran (needed for docs)
  • ⏭️ build-linux-aarch64 and build-windows were skipped
  • ⏭️ All test jobs were skipped
  • doc job ran and passed
  • checks job passed despite skipped tests

Cosmetic issue: Skipped jobs display with unexpanded variables in the GitHub UI (e.g., Build ${{ matrix.host-platform }}, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }}). This is a known GitHub Actions limitation—when a job is skipped, it cannot evaluate expressions that reference outputs from other jobs. The CI logic is correct; only the display name is affected.

Then, I removed [doc-only] from the title and re-ran CI to verify normal behavior still works (all jobs run, tests execute, etc.).

@Andy-Jost Andy-Jost added CI/CD CI/CD infrastructure feature New feature or request and removed cuda.core Everything related to the cuda.core module enhancement Any code-related improvements labels Jan 14, 2026
@Andy-Jost Andy-Jost marked this pull request as ready for review January 14, 2026 01:10
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
@Andy-Jost
Copy link
Contributor Author

/ok to test a5d6651

@Andy-Jost
Copy link
Contributor Author

/ok to test cb34189

Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome

@Andy-Jost
Copy link
Contributor Author

/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) }}
Copy link
Member

@leofang leofang Jan 14, 2026

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.)

Comment on lines +238 to 240
if ${{ needs.doc.result == 'cancelled' }}; then
exit 1
else
exit 0
fi
Copy link
Member

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
Copy link
Member

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.

Copy link
Contributor Author

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?

@Andy-Jost Andy-Jost merged commit 709c402 into NVIDIA:main Jan 14, 2026
156 of 157 checks passed
@Andy-Jost Andy-Jost deleted the doc-only-ci branch January 14, 2026 17:31
@github-actions
Copy link

Doc Preview CI
Preview removed because the pull request was closed or merged.

@leofang leofang added this to the cuda.core beta 12 milestone Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD CI/CD infrastructure feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: Allow only triggering the doc-build pipeline

3 participants