CI: Validate all defconfig files before running any builds #14317
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.
TODO: This adds 15 mins to Every CI Job, might exceed our quota of GitHub Runner Minutes. Maybe we should trigger this in
github.com/nuttxpr
, whenever a PR is created / modified?Summary
Currently, CI Build Jobs will validate the
defconfig
file just before compiling the NuttX Target (likerv-virt:nsh
). This means that the Build Job might run for a while, before hitting adefconfig
error and failing much later.This PR updates the CI Workflow
build.yml
to validate alldefconfig
files before running any builds. This means that errors in thedefconfig
files will be flagged earlier. And the Build Job will terminate (with an error) before any build begins.This behaviour is helpful for resolving CI Build Issues quickly. The code is derived from
tools/testbuild.sh
. The enhancement was suggested here: #14259Impact
The CI Workflow
build.yml
will validate alldefconfig
files before running any builds. This might take up to 15 mins for bigger jobs, likearm-05
.If any errors are found in
defconfig
files: The Build Job will terminate (with an error) after alldefconfig
files have been validated, before any build begins.The Updated CI Workflow shall be synced to
nuttx-apps
repo in the next PR.Testing
We tested by creating an intentional error in a
defconfig
file:If defconfig validation fails: The Build Job terminates (with an error) after all
defconfig
files have been validated, before any build beginshttps://github.com/lupyuen5/label-nuttx/actions/runs/11344293823/job/31548821624
Errors are specially formatted to display correctly in the GitHub Actions Job Summary:
If defconfig validation is successful: The Build Job continues to build the targets
https://github.com/lupyuen5/label-nuttx/actions/runs/11361897141/job/31604515998