Commit Graph

348 Commits

Author SHA1 Message Date
Ramon Roche 68e55cfc2a ci(ros): use matching branch for px4-ros2-interface-lib (1.17)
Backport of #26781 with the follow-up fix from #27000 folded in.

On release branches, the ROS integration test now clones a matching
branch from Auterion/px4-ros2-interface-lib instead of always using
main, preventing build failures from uORB message divergence between
main and release branches.

Branch resolution uses GITHUB_BASE_REF on pull requests (the branch
the code is merging into) and falls back to GITHUB_REF_NAME for
direct pushes, so backport PRs resolve to their target release
branch instead of the PR author's branch.

Fixes https://github.com/Auterion/px4-ros2-interface-lib/issues/184

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-08 11:03:38 -06:00
Ramon Roche 5389f75577 ci(container): add build_ref input to allow dispatch against arbitrary refs
The current workflow_dispatch path builds whatever HEAD of the dispatch ref
is, labels the resulting image with px4_version, and publishes. That's
fine for rebuilding current state but it cannot rebuild the exact commit
a release tag points to, because the dispatch loads the workflow file
from one ref and implicitly checks out the same ref for the build.

This matters for release recovery. When the v1.17.0-rc2 tag push failed
to publish containers back on 2026-03-13 (the v1 GHA cache protocol
removal in RunsOn v2.12.0), the tag was not re-pushed, so the only way
to publish rc2 containers now is via workflow_dispatch. Without this
change, a dispatch against release/1.17 builds release/1.17 HEAD and
labels it v1.17.0-rc2, which produces a container whose contents do not
match the rc2 tag's actual code. That is not a faithful recovery.

Add a build_ref input that controls only the checkout ref, defaulting
to empty which falls back to github.ref (preserving current behavior
for both push events and dispatches that omit the input). With this,
a release recovery looks like:

  gh workflow run dev_container.yml --repo PX4/PX4-Autopilot \
    --ref release/1.17 \
    -f px4_version=v1.17.0-rc2 \
    -f build_ref=v1.17.0-rc2 \
    -f deploy_to_registry=true

The workflow loads from release/1.17 HEAD (which has the cache fix
from 39b0568 and the hardening from d74db56a), but the build uses
Tools/setup/Dockerfile from the rc2 tag. The published image has
rc2 contents under the rc2 label, as if the original tag push had
worked.

All three actions/checkout steps (setup, build, deploy) take the same
ref expression so every job sees a consistent workspace. Non-dispatch
events (push, PR) evaluate github.event.inputs.build_ref to empty and
fall back to github.ref exactly as before.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
(cherry picked from commit e4d46f20f4)
2026-04-07 18:22:39 -06:00
Ramon Roche 3b84cdbdbe ci(container): harden dev_container workflow against cache-export flakes
Three related fixes to prevent a repeat of the v1.17.0-rc2 incident, where a
post-push GHA cache-export 404 failed the arm64 build after both registry
pushes had already succeeded, fail-fast cancelled amd64, and the deploy job
was skipped, leaving the registries with only a partial arm64 publish and no
multi-arch manifest.

- Mark cache export as non-fatal via ignore-error=true on cache-to. A
  successful registry push should never be undone by a cache-layer flake.
  This alone would have let rc2 publish correctly.

- Decouple the deploy job from the build job's exit code. Change its if:
  gate to !cancelled() + setup success only, and promote the existing
  "Verify Images Exist Before Creating Manifest" step from a warning into
  a hard precondition. Deploy now runs whenever both per-arch tags actually
  exist in the registries, which is its real precondition, and fails loudly
  if a tag is missing.

- Bump every action to the current major (runs-on/action v2,
  actions/checkout v5, docker/login-action v4, docker/setup-buildx-action v4,
  docker/build-push-action v7, docker/metadata-action v6). This gets the
  workflow off Node 20 before GitHub's June 2 2026 forced runtime switch
  and keeps runs-on/action on the same major as the runs-on platform.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
(cherry picked from commit d74db56a06)
2026-04-07 18:22:39 -06:00
Ramon Roche 39b0568ea4 fix(ci): remove deprecated v1 cache API from container build
Backport of #26742 to release/1.17.

RunsOn v2.12.0 (March 6, 2026) removed v1 cache toolkit support,
causing the buildx GHA cache proxy to return 404 for v1 endpoints.
This broke the v1.17.0-rc2 container build.

Removing the explicit version=1 parameter lets buildkit auto-detect
the v2 protocol.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 15:59:48 -07:00
Ramon Roche 61904bc14a ci: fix S3 upload so tags don't overwrite stable firmware
Remove the step that uploaded every version tag to the stable/ S3
directory, which caused QGC users selecting "stable" to receive
pre-release firmware (#26340). The stable/ and beta/ directories
are now controlled exclusively by their respective branch pushes,
while version tags only upload to their versioned archive directory
(e.g., v1.16.1/). Pre-release tags are also correctly marked on
GitHub Releases.

Co-authored-by: Julian Oes <julian@oes.ch>

Fixes #26340

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-13 07:25:28 -08:00
Matthias Grob fd68d5d043 CI: replace all usage of addnab/docker-run-action
It's unmaintained and the docker version it uses is not supported anymore.
2026-02-13 06:35:09 -08:00
Peter van der Perk 82532f9642 [BACKPORT 1.17] imxrt related fixes and mr-tropic support (#26052) 2025-12-23 15:10:07 -05:00
Ramon Roche 2fba5b4c1a ci: pull emscripten v4.0.15 to avoid c++17 errors (#25739)
https://github.com/emscripten-core/emscripten/issues/24850

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-10 09:43:20 -08:00
Ramon Roche d6f7519df0 ci: builds all cache pip
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-09 20:57:06 -04:00
Ramon Roche 2eac99cd20 ci: AWS instance review and improved build caching
* Tone down the performance of some runners from 8cpu+ down to 4cpu+
* Improve and document caching on PX4 builds with an improved ccache key strategy
* Review and document artifact upload logic for binaries uploaded to S3 and github
releases
* Future Improvement, introduce runners configuration file so we can
control more precesily which instances are allocated.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-10-09 20:57:06 -04:00
Hamish Willee d85994b521 Make Github docs-deploy workflow only run manually 2025-10-08 15:00:53 -07:00
Hamish Willee 32a74afbb8 Add workflow_dispatch to AWS docs deployment 2025-10-01 17:05:44 +10:00
Hamish Willee 5999cad92c Update aws docs deployment (match current 1.16) (#25680) 2025-10-01 15:40:43 +10:00
Hamish Willee 367f12b338 Don't build translations on push (only PR) (#25631) 2025-09-25 17:05:23 +10:00
Hamish Willee 9b83c9ba30 Update docs_deploy.yml to also run on translation PRs (#25630)
Added support for localization document translations in the workflow.
2025-09-25 13:35:34 +10:00
Ramon Roche e7c5001e94 ci: stale and close issues/prs with no activity (#25554)
- Marked as stale if no activity for 90 days
 - Closed if no activity for 30 days after being marked as stale
 - Helpful stale and close messages

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Daniel Agar <daniel@agar.ca>
2025-09-24 22:06:56 -04:00
Beat Küng 061f34919e ci: JasonEtco/create-an-issue needs permissions to create issues 2025-09-22 09:31:26 -07:00
Hamish Willee 18d76b18b9 docs_flaw_checker.yml3 - use sed to strip out the escapes (#25463) 2025-08-20 16:40:56 +10:00
Hamish Willee 722580760c docs_flaw_checker.yml pt 2 (#25462) 2025-08-20 16:35:49 +10:00
Hamish Willee c65b1d845a docs_flaw_checker.yml - attempt to fix the flaw safely (#25461) 2025-08-20 16:31:12 +10:00
Hamish Willee 01db727fa2 Fix workflow vulnerabilities in flaw checker and comments (#25419)
* docs_pr_comment.yml - fix script expansion issue

* Fix flaw checker too

* docs_flaw_checker.yml - tj-actions/changed files to latest

Fixes security bug in using vulnerable version

---------

Co-authored-by: PX4BuildBot <bot@pixhawk.org>
2025-08-14 17:38:14 +10:00
Hamish Willee f3e7d14efa [Docs] msg/VehicleAirData.msg - to standard (#25228)
* [Docs] msg/VehicleAirData.msg - to standard

* Update msg/VehicleAirData.msg

* Update msg/VehicleAirData.msg

* Update msg/VehicleAirData.msg

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* Update msg/VehicleAirData.msg

* Fix up build issue related to docs_deploy2

---------

Co-authored-by: PX4BuildBot <bot@pixhawk.org>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2025-08-14 11:37:48 +10:00
Hamish Willee c320a9240b Add docs deploy 2 for testing (#25416) 2025-08-13 15:51:44 +10:00
Beat Küng ee62a55adc ci: automatically open an issue in case the fuzzing CI fails 2025-08-06 16:49:00 -04:00
Beat Küng ba678120d8 ci: update fuzzing.yml container to px4io/px4-dev:v1.16.0-rc2-4-gb67c65bfe6
There was a build error with the previous container:
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
  /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.28/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  build/px4_sitl_test/_deps/abseil-cpp-src/CMakeLists.txt:98 (find_package)

See https://github.com/PX4/PX4-Autopilot/actions/runs/16235116238/job/45844179833
2025-08-06 16:49:00 -04:00
Ramon Roche e021a1c946 Tools: Update macos dependencies (#25361)
* tools: macos.sh update cross-compiler

* tools: editor styleguide for bash scripts

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-08-04 22:15:30 -04:00
Jacob Dahl 9e811136a2 ci: clang-tidy: fix attempt (#25328) 2025-07-31 10:35:38 -07:00
Marco Hauswirth c9206d6bd1 EKF2: gnss reset improvements (#25297)
* ekf2: allow manual position reset when horizontal aiding is active

This allows the pilot to override position esitmates manually

* mavlink sim: add support of failure gps struck

* mavlink sim: add GNSS failure "wrong" type

* ekf2-gnss: add reset mode

This allows the user to choose whether the position should immediately
be reset to GNSS on fusion timeout or if the EKF can continue with
velocity dead-reckoning.

* ekf2: fix unit test changes due to GNSS start logic

Especially because the EKF doesn't need to reset the states if the test
ratio is already passing

* rename mode enum

* reset to gps lat lon on init

* remove obsolete reset-condition (handled in #25223)

* WIP try to upgrade compiler externally

---------

Co-authored-by: bresch <brescianimathieu@gmail.com>
Co-authored-by: Niklas Hauser <niklas@auterion.com>
2025-07-30 11:39:56 +02:00
Beat Küng c801fd36d3 ci: add fuzzing workflow
This will run all fuzzing tests for 15 minutes once a day.
2025-07-11 10:39:28 +02:00
Beat Küng 7594a270f7 tests: remove previous fuzz testing
We now use https://github.com/google/fuzztest (see previous commits).
And the test was also failing to build
(https://github.com/PX4/PX4-Autopilot/actions/workflows/cflite_batch.yml)

This reverts these commits:
- 9eda5b373c
- 2cbc993976
- be0a5b4b32
2025-07-11 10:39:28 +02:00
Beat Küng 3d1cace7b7 test: add google fuzztest to unit test build
From https://github.com/google/fuzztest.
This will now also add gtest (via cmake FetchContent)

And requires newer cmake (container updates):
CMake 3.19 or higher is required.  You are running version 3.16.3
2025-07-11 10:39:28 +02:00
Kitsios Konstantinos 6e1ab343f6 ci: EKF change indicator concurrency limit (#25189)
Signed-off-by: Konstantinos <konstantinos.kitsios@uzh.ch>
2025-07-10 19:15:25 -07:00
chfriedrich98 e266d1f22f rover: remove deprecated module 2025-07-10 10:11:58 +02:00
Ramon Roche dcde7b47d1 ci: remove paths ignore
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 83606cb0fc ci: concurrency cancel in progress
save compute time

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 8a44f10cf9 ci: trigger on pull request for .github/workflows
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche 13f3a7ec6d ci: fix branch trigger strategy
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Ramon Roche d46420e1dc ci: check with updated container
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-07-07 10:25:40 +02:00
Hamish Willee 0622f12285 Create Labeler workflow 2025-07-02 14:43:55 -07:00
Marco Hauswirth adc299d019 remove paths-ignore in workflows to enable CI-checks for pure CI changes... 2025-06-25 08:04:43 -07:00
Ramon Roche 34d4eb7b9e ci: update build container (#25059)
adds lark python dependency #25056

https://github.com/PX4/PX4-Autopilot/pull/25056

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-06-16 14:57:17 -08:00
Ramon Roche efc3e64c00 ci: update rosdistro apt keys (#25060)
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-06-16 13:46:33 -08:00
Ramon Roche bdb0e4270c ci: updates branch name strategy
fixes #24866

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-06-05 06:43:23 -07:00
Alexander Lerach 77894b7c83 ci/boards: add itcm checker, update ITCM mapping of v6xrt and tropic-community 2025-05-19 07:44:35 -07:00
Ramon Roche 4c369be95e ci: make sure we run when we need to
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-05-16 09:54:49 -07:00
Ramon Roche e6433d443c ci: use native arch builders
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-05-16 09:54:49 -07:00
alexcekay ab6c6ac769 ci: fix failsafe_sim for newer GCC versions 2025-05-16 09:54:49 -07:00
alexcekay 01c23f635f ci: fix flash analysis for newer GCC versions 2025-05-16 09:54:49 -07:00
alexcekay c1ffdc8e3e ci: use dev-container for nuttx targets 2025-05-16 09:54:49 -07:00
Ramon Roche 4e8760097d ci: build px4-dev containers on demand
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2025-05-15 21:24:35 +02:00