Skip to content

ci: run successive main commits side by side - #1498

Merged
roivanov merged 2 commits into
NVIDIA:mainfrom
roivanov:ci/parallel-main-runs
Oct 12, 2026
Merged

roivanov merged 2 commits into
NVIDIA:mainfrom
roivanov:ci/parallel-main-runs

Conversation

@roivanov

@roivanov roivanov commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Successive pushes to main share one concurrency group per workflow, so the newer run waits until the older one finishes. Each commit on main now has its own group and starts immediately. The previous run still finishes. Any other ref still cancels its older run.

The book workflow is the exception. Its builds stay in one group per ref so a slower older commit cannot publish after a newer one and replace the site.

Changes

  • Append the commit SHA to the concurrency group when the ref is main, in CI, CodeQL, docs, examples, status-guard, naming-guard, and the Tile workflow.
  • Leave book.yml as one group per ref. The deploy job keeps the shared pages group.
  • Keep cancel-in-progress: ${{ github.ref_name != 'main' }}. The SHA in the group already separates commits on main, so this line is what states the policy in plain sight: runs on main are not cancelled, and every other ref still cancels the older run. Removing it would leave that rule buried in the group string.

Testing

Workflow configuration only. No crate, example, or guard behavior changed, so just check and cargo oxide run were not run.

  • just -f cuda-oxide/Justfile check passes (the local mirror of CI: fmt, clippy, tests, guards, docs)
  • cargo oxide run <example> passes, or cuda-oxide/scripts/smoketest.sh -o '^<example>$'
  • New example added (if applicable)

Checklist

  • All commits signed off (git commit -s)
  • SPDX headers on new source files

Questions about the review? Ping us in #contributors on Discord.

A shared concurrency group queued the newer push until the older one
finished. Each commit on main now has its own group, so it starts at once.
Other refs still cancel the older run.

Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 12, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@roivanov
roivanov marked this pull request as ready for review October 12, 2026 16:43
cryos
cryos previously approved these changes Oct 12, 2026

@cryos cryos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems reasonable. FYI in a few projects we did this kind of thing before specializing to a couple of main launched YAMLs - ci.yml for merged commits and pr.yml for PRs. It let us specialize for the two major paths we supported and avoided any concurrency in ci.yml while pushing fail fast etc in PRs. Not needed right now, but worth considering for future work on CI.

@elibol

elibol commented Oct 12, 2026

Copy link
Copy Markdown
Collaborator

LGTM, but is the book.yml change the behavior we want? I think it will publish whichever build finishes last, not the newest commit.

A per-commit concurrency group would build two main pushes at once, and the
deploy that finishes last would publish. That can replace the site with an
older book. This workflow stays one group per ref.

Signed-off-by: Roman Ivanov <rivanov@nvidia.com>
@roivanov

Copy link
Copy Markdown
Collaborator Author

@elibol You are right. A per-commit group would build two main pushes at once, and the shared pages group would then publish whichever deploy became ready last. A slower older commit could replace the site with the older book.

book.yml is back to one group per ref, so builds and deploys stay in commit order. The pages group is unchanged. The other workflows still use a per-commit group on main; they do not publish.

@roivanov

Copy link
Copy Markdown
Collaborator Author

LGTM, but is the book.yml change the behavior we want? I think it will publish whichever build finishes last, not the newest commit.

Good catch, fixed.

@elibol elibol left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@roivanov
roivanov merged commit e508255 into NVIDIA:main Oct 12, 2026
62 of 116 checks passed
@roivanov
roivanov deleted the ci/parallel-main-runs branch October 12, 2026 18:53
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 this pull request may close these issues.

3 participants