mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-11-26 17:30:28 +08:00
ci(px4io): keep one IO firmware binary per IO board and check it in CI
The px4io firmware was committed as a copy in the extras of each of the 30 boards using it. "make px4io_update" only knew about 15 of them, so the copies drifted into 5 different versions, and none had been regenerated since 2024-03 despite changes to px4iofirmware, lib/rc and NuttX. Keep a single binary per IO board in boards/<vendor>/<io board>/extras and let the ROMFS pick it via the existing CONFIG_BOARD_IO option, which every board with the px4io driver already sets (cubepilot boards override it). This also replaces the outdated per-board copies on boards that were missed by "make px4io_update". The IO build is reproducible with a fixed toolchain (verified across checkout paths and container vs host with the same GCC), so CI can rebuild it and compare. "make check_px4io" does that, and a new CI job turns a mismatch into a warning. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Julian Oes <julian@oes.ch>
This commit is contained in:
1 parent
f8e80858ad
commit
a88edf1abe
34 files changed
+73
-51
No files matched your search
@@ -48,6 +48,46 @@ jobs:
|
||||
PX4_SBOM_DISABLE: 1
|
||||
run: make ${{ matrix.check }}
|
||||
|
||||
# The committed px4io firmware binaries must match what the current sources build to.
|
||||
# The build is reproducible with a fixed toolchain, so a mismatch means a dependency
|
||||
# changed without "make px4io_update". This only warns, it does not fail the job.
|
||||
px4io_firmware:
|
||||
name: IO Firmware Up To Date
|
||||
runs-on: [runs-on,runner=2cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
||||
container:
|
||||
# keep in sync with the image named in the warning below
|
||||
image: ghcr.io/px4/px4-dev:v1.17.0-rc2
|
||||
steps:
|
||||
- uses: runs-on/action@v2
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Configure Git Safe Directory
|
||||
run: git config --system --add safe.directory '*'
|
||||
|
||||
- name: Build px4io firmware
|
||||
env:
|
||||
PX4_SBOM_DISABLE: 1
|
||||
run: make px4io_update
|
||||
|
||||
- name: Compare with committed binaries
|
||||
env:
|
||||
PX4_SBOM_DISABLE: 1
|
||||
run: |
|
||||
if ! make check_px4io; then
|
||||
image="ghcr.io/px4/px4-dev:v1.17.0-rc2"
|
||||
echo "::warning title=px4io firmware out of date::The committed px4io firmware does not match the current sources. Regenerate it with: PX4_DOCKER_REPO=${image} ./Tools/docker_run.sh 'make px4io_update'"
|
||||
{
|
||||
echo "### px4io firmware out of date"
|
||||
echo
|
||||
echo "The committed px4io firmware does not match what the current sources build to. Regenerate and commit it:"
|
||||
echo
|
||||
echo '```'
|
||||
echo "PX4_DOCKER_REPO=${image} ./Tools/docker_run.sh 'make px4io_update'"
|
||||
echo '```'
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
fi
|
||||
|
||||
tests:
|
||||
name: Unit Tests
|
||||
runs-on: [runs-on,runner=8cpu-linux-x64,image=ubuntu24-full-x64,"run-id=${{ github.run_id }}",spot=false,extras=s3-cache]
|
||||
|
||||
Reference in new issue
Block a user