Repository navigation
ci/build: Skip heavy build matrix on draft pull requests - #3917
Merged
Merged
Conversation
In response to the ASF Infrastructure notice regarding excessive GitHub Actions runner consumption, skip the heavy build matrix when a pull request is in draft state. Companion to apache/nuttx PR #20973. Fast checks (check.yml and lint.yml) continue to run to provide early style and syntax feedback. The full build matrix will automatically trigger once the PR is marked 'Ready for review'. Signed-off-by: Swatantra Yadav <[email protected]>
xiaoxiang781216
approved these changes
Oct 25, 2026
cederom
approved these changes
Oct 25, 2026
cederom
left a comment
Contributor
There was a problem hiding this comment.
Thank you @Swatantra-66 .. we may want complementary update on nuttx-apps repo when this is verified okay? :-)
acassis
approved these changes
Oct 25, 2026
Contributor
Author
thank you for aproval @cederom, this PR is actually already on the nuttx-apps repository, The companion PR for core nuttx (apache/nuttx#20973) was also verified earlier. So both repositories now have the draft-skip optimization in place. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to merged apache/nuttx#20973 (apache/nuttx@b63e526c91).
In response to the notice from ASF Infrastructure regarding excessive GitHub Actions runner consumption, this patch skips the heavy 80-container build matrix when a pull request is in Draft state:
types: [opened, synchronize, reopened, ready_for_review]toon.pull_requestso GitHub Actions recognizes when a draft pull request is transitioned to ready for review.if: github.event_name != 'pull_request' || github.event.pull_request.draft == falsetoFetch-Source. Because all downstream matrix jobs (Linux,macOS,msys2,msvc) depend onFetch-Source, skippingFetch-Sourcecleanly cascades to skip all heavy build jobs on draft pull requests.check.ymlandlint.yml) continue to run on draft pull requests to provide immediate code style and lint feedback within ~60 seconds without consuming heavy runner hours.draft == false) to ensure empty/null payloads on fork PRs do not accidentally trigger the job.Impact
Runner Savings - Prevents all 80 runner matrix jobs (Linux, Intel macOS, MSYS2 Windows, MSVC) from executing on draft / WIP pull requests in
nuttx-apps.Automatic Resume - When a contributor clicks "Ready for review", GitHub Actions automatically fires the
ready_for_reviewevent and executes the full build matrix.Testing
Validated GitHub Actions workflow YAML syntax via
yaml.safe_load.Verified
git diff --checkpasses with zero errors or whitespace issues.