mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-07-27 08:58:09 +08:00
fix(ci): restore board target matrix generation after zenoh Kconfig change
Since b11e615810 src/modules/zenoh/Kconfig sources the generated topic
catalog through ZENOH_KCONFIG_TOPICS, which only cmake exports, so every
standalone Kconfig parse crashed and build_all_targets produced an empty
build matrix on every run while the scan job still reported success.
Add Tools/kconfig/loadconfig.py as the single entry point for parsing
the Kconfig tree outside cmake: it generates the topic catalog exactly
like cmake/kconfig.cmake and provides shared board/target enumeration
and config loading. Port generate_board_targets_json.py (CI matrix) and
updateconfig.py (make updateconfig) to it; both were independently
broken and each reimplemented board scanning on its own.
Harden the workflow so the next failure of this class is loud: run the
generator as a standalone assignment, so bash -e fails the step (the
previous echo "matrix=$(...)" form masked the exit code), and write
the JSON outputs through the heredoc GITHUB_OUTPUT form.
Matrix output verified byte-identical to the pre-b11e6158101 baseline
in all three modes; updateconfig output verified identical against the
same baseline.
Assisted-by: Claude:claude-fable-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
23
.github/workflows/build_all_targets.yml
vendored
23
.github/workflows/build_all_targets.yml
vendored
@@ -86,17 +86,34 @@ jobs:
|
||||
- name: Install Python Dependencies
|
||||
run: pip3 install -U packaging -r ./Tools/setup/requirements.txt
|
||||
|
||||
# The generator runs as a standalone assignment so a non-zero exit
|
||||
# fails the step; embedded in `echo "x=$(...)"` it would be masked
|
||||
# and the empty output silently skips the whole build matrix.
|
||||
- id: set-matrix
|
||||
name: Generate Build Matrix
|
||||
run: echo "matrix=$(./Tools/ci/generate_board_targets_json.py --group)" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
matrix=$(./Tools/ci/generate_board_targets_json.py --group)
|
||||
{
|
||||
echo "matrix<<EOF"
|
||||
echo "$matrix"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- id: set-seeders
|
||||
name: Generate Seeder Matrix
|
||||
run: echo "seeders=$(./Tools/ci/generate_board_targets_json.py --group --seeders)" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
seeders=$(./Tools/ci/generate_board_targets_json.py --group --seeders)
|
||||
{
|
||||
echo "seeders<<EOF"
|
||||
echo "$seeders"
|
||||
echo "EOF"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
|
||||
- id: set-timestamp
|
||||
name: Save Current Timestamp
|
||||
run: echo "timestamp=$(date +"%Y%m%d%H%M%S")" >> $GITHUB_OUTPUT
|
||||
run: |
|
||||
timestamp=$(date +"%Y%m%d%H%M%S")
|
||||
echo "timestamp=$timestamp" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- id: set-branch
|
||||
name: Save Current Branch Name
|
||||
|
||||
Reference in New Issue
Block a user