447 Commits

Author SHA1 Message Date
Ramon Roche
4c8c9a1e0f ci(clang-tidy): run incrementally on PRs and post inline annotations
Switch the Static Analysis workflow to two modes:
- Push to main: run the full "make clang-tidy" target as before.
- Pull request: build the clang compile database with
  "make px4_sitl_default-clang", then call Tools/ci/run-clang-tidy-pr.py
  (already in-tree) to compute the translation units actually affected
  by the PR diff and run clang-tidy only on that subset. PRs that touch
  no C++ files exit silently; the large majority of PRs will skip the
  slow full analysis entirely.

Replace the inline ccache restore/config/save steps with the composite
actions from .github/actions/setup-ccache and .github/actions/save-ccache,
which use content-hash cache keys (prefix-ref-sha with ref and base_ref
fallbacks), compression, and compiler_check=content. Same 120M cap.

Add a second job, post_clang_tidy_comments, that runs on a GitHub-hosted
runner when the analysis job reports has_findings=true. It downloads the
compile_commands.json artifact produced by the analysis job, rewrites
the AWS RunsOn workspace prefix (/__w/PX4-Autopilot/PX4-Autopilot) to the
GitHub-hosted runner workspace so clang-tidy can chdir into the build
directory, runs clang-tidy-diff-18 to export fixes, and posts inline
review annotations via platisd/clang-tidy-pr-comments@v1.

Annotations are set to request changes (request_changes: true), so a PR
with new clang-tidy findings will be blocked until they are addressed or
waived. suggestions_per_comment is capped at 10. Annotations are gated
to same-repo PRs only; forks skip the annotation job because GITHUB_TOKEN
has no write access there.

The post_clang_tidy_comments job uses if: always() && ... so it runs
whether the analysis job succeeded or failed (findings still need to be
surfaced when the analysis exits non-zero).

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-08 22:45:03 -06:00
Ramon Roche
48b04b1c81 ci(container): bump px4-dev to ghcr.io/px4/px4-dev:v1.17.0-rc2
Standardize on the GitHub Container Registry copy of px4-dev:v1.17.0-rc2
across workflows still pulling the old dockerhub v1.16.0-rc1 image, and
move the workflows that were already on v1.17.0-beta1 from docker.io to
ghcr.io so the whole repo pulls from one registry at the same version.

Also modernize the "git ownership workaround" in the touched workflows
that still used `git config --global --add safe.directory "$GITHUB_WORKSPACE"`
to the `--system --add safe.directory '*'` form already in use by
clang-tidy, flash_analysis, failsafe_sim, itcm_check, and docs-orchestrator.

Updated workflows:
- checks.yml
- clang-tidy.yml (was on v1.17.0-beta1, now on rc2)
- docs-orchestrator.yml (was on v1.17.0-beta1, two jobs)
- ekf_functional_change_indicator.yml
- ekf_update_change_indicator.yml
- failsafe_sim.yml
- flash_analysis.yml
- itcm_check.yml
- nuttx_env_config.yml

Deliberately out of scope for this PR and deferred to focused follow-ups:
- fetch-depth: 0 to 1 (firmware builds and flash_analysis base-ref
  checkout need git history)
- PX4_SBOM_DISABLE removal in checks.yml (behavioral change)
- fail-fast: false to true (behavioral change)
- codecov-action upgrade

No other workflows touched. compile_ubuntu.yml, ros_integration_tests.yml,
sitl_tests.yml, mavros_*_tests.yml, fuzzing.yml, build_deb_package.yml,
dev_container.yml all use different image families or serve different
purposes and are not part of this sweep.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-08 21:46:07 -06:00
Ramon Roche
eb9a76cfaf ci(actions): add composite actions and clang-tidy PR helper
Add four reusable building blocks that upcoming CI optimization PRs will
consume. No existing workflow is modified; these files are dormant until
referenced.

- .github/actions/setup-ccache: restore ~/.ccache with content-hash keys,
  write ccache.conf with compression and content-based compiler check
- .github/actions/save-ccache: print stats and save the cache under the
  primary key produced by setup-ccache
- .github/actions/build-gazebo-sitl: build px4_sitl_default plus the
  Gazebo Classic plugins with ccache stats between stages
- Tools/ci/run-clang-tidy-pr.py: compute the translation units affected
  by a PR diff and invoke Tools/run-clang-tidy.py on that subset only,
  exiting silently when no C++ files changed

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-08 13:14:16 -06:00
Ramon Roche
395236dc7f ci(ros): clone px4-ros2-interface-lib using PR base branch
The previous logic used GITHUB_HEAD_REF, which on a pull request is
the source (PR author's) branch name. For backport PRs (e.g.
mrpollo/backport-26781-1.17), no matching branch exists in
px4-ros2-interface-lib, so the script fell back to main and the
build broke from uORB message divergence.

Switch to GITHUB_BASE_REF, which on a PR is the branch the code is
being merged into (main or release/X.Y), and fall back to
GITHUB_REF_NAME for direct pushes. This always resolves to a real
branch in px4-ros2-interface-lib.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-08 01:17:15 -06:00
Ramon Roche
9f9171575e ci(apt): gate apt mirror swap on runs-on at the workflow level
Add 'if: startsWith(runner.name, "runs-on--")' to the mirror swap step
in both workflows so fork users can see at a glance that the step only
fires on runs-on runners and is a no-op on standard GitHub-hosted
runners. The script keeps its internal RUNS_ON_AWS_REGION check as
defense in depth for callers outside these workflows.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
60db79f35e ci(apt): extract AWS apt mirror swap into shared script
The mirror swap was duplicated across two workflows. Move it into
Tools/ci/use_aws_apt_mirror.sh and call the script from each workflow
after checkout but before any heavy apt work like Tools/setup/ubuntu.sh.

The script no-ops outside runs-on (RUNS_ON_AWS_REGION unset), so it is
safe to call from forks, self-hosted runners, or local container runs
without changing behavior there. The region is read from the runs-on
environment instead of being hardcoded, so future region changes only
need updating where the runner is provisioned.

The bootstrap 'apt install git' step keeps the default mirror because
git is one package and is unlikely to hit the dep11 desync issue that
broke ubuntu.sh.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
2798910293 ci(ubuntu): use AWS regional mirror for apt in compile workflow
The compile_ubuntu workflow's apt operations talk directly to
archive.ubuntu.com, which round-robins across community mirrors that
occasionally serve out-of-sync index files mid-sync and break apt update
for everyone until the upstream catches up.

Apply the same mirror swap as build_deb_package.yml: rewrite the
container's apt sources to point at us-west-2.ec2.archive.ubuntu.com
before any apt operation runs, so both the inline 'apt update' and the
later Tools/setup/ubuntu.sh call benefit from the regional mirror.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
f77a1a44a0 ci(deb): publish SIH image as px4io/px4-sitl
The SIH image is the canonical PX4 SITL container, so drop the redundant
-sih suffix and publish it as px4io/px4-sitl. Gazebo continues to publish
as px4io/px4-sitl-gazebo.

Decouples the published image name from the matrix.image identifier by
introducing a matrix.repo field, so renames like this don't require
touching the matrix logic.

This is a breaking change for anyone pulling px4io/px4-sitl-sih directly;
the old tags remain available but no new ones will be published under
that name.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
1ba562f400 ci(deb): use AWS regional mirror for apt in deb build container
The default archive.ubuntu.com round-robin can serve out-of-sync index
files mid-sync, which makes apt-get update fail with 'File has unexpected
size' errors and breaks the deb build job for everyone until the upstream
mirror catches up.

Rewrite the container's apt sources to point at us-west-2.ec2.archive.
ubuntu.com instead. The EC2 archive mirrors are Canonical-operated,
region-local to the runs-on instances, and sync aggressively, eliminating
the round-robin lottery as a CI failure mode.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 20:01:55 -06:00
Ramon Roche
e4d46f20f4 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>
2026-04-07 17:26:47 -06:00
Ramon Roche
86f0dc2cb1 ci(ros): stop uploading test logs to logs.px4.io
Drops --upload from the ROS integration test runner so CI runs no
longer publish ULogs to the public logs.px4.io server on every run.
Failure debugging is unaffected: the existing Upload failed logs step
already captures logs as GitHub Actions artifacts on failure.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-07 16:41:19 -06:00
Ramon Roche
d74db56a06 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>
2026-04-07 14:32:48 -06:00
Ramon Roche
dd03e18fee ci(packaging): publish container images with :latest tag
Add :latest tag alongside version tags for per-arch images and
multi-arch manifests on both Docker Hub and GHCR.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 15:03:04 -06:00
Ramon Roche
1079c57fd0 build(packaging): add PX4 SITL .deb packages
Add cmake/cpack infrastructure for building .deb packages from
px4_sitl_sih and px4_sitl_default targets. Includes install rules,
package scripts, Gazebo wrapper, and CI workflow.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 15:03:04 -06:00
Ramon Roche
685f9248e4 fix(sbom): fix false positives in monthly license audit
Three issues caused the monthly audit to report already-resolved submodules:

1. The audit workflow grepped for "NOASSERTION" anywhere in the output,
   matching the Detected column even when the Final column had a valid
   override (e.g. libtomcrypt detected as NOASSERTION but overridden to
   Unlicense). Changed to grep for "<-- UNRESOLVED" marker instead.

2. Submodules with an explicit NOASSERTION override in license-overrides.yaml
   (like libfc-sensor-api, which is proprietary) were still counted as
   failures. Now treated as "acknowledged" since someone intentionally
   added the override entry.

3. Added missing BSD-3-Clause override for sitl_gazebo-classic (PX4 org
   project with no LICENSE file in repo).

Fixes #26932

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-02 11:15:30 -06:00
Ramon Roche
b142342c3a
ci(claude): add review-pr skill for domain-aware PR reviews (#26814)
* ci(claude): add review-pr skill for domain-aware PR reviews

Add a Claude Code skill that reviews pull requests with checks
tailored to the domains touched (estimation, control, drivers,
simulation, system, CI/build, messages, board additions).

Built from analysis of 800+ PR reviews across 8 PX4 maintainers.
Includes merge strategy recommendation, interactive dialog for
submitting reviews, and human-sounding PR comment formatting.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci(copilot): add domain-scoped review instructions for GitHub Copilot

Add .github/instructions/ files that give GitHub Copilot PR reviews
the same domain-aware context as the Claude Code review-pr skill.

Each file is scoped via applyTo to the relevant source paths:
core review, estimation, control, drivers/CAN, simulation, system,
CI/build, messages/protocol, and board additions.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* fix(claude): address Copilot review feedback

- Fix step reference in review-pr skill (step 8 -> step 9)
- Capitalize CMake consistently in skill and Copilot instructions

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-04-01 17:56:23 -07:00
Ramon Roche
b243398231
feat(build): add SPDX 2.3 SBOM generation for builds (#26731) 2026-03-31 17:06:51 -06:00
Beniamino Pozzan
7584f7567f
ci(px4_msgs): publishing stable tag triggers tag creation in px4_msgs (#26858)
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
2026-03-28 17:30:20 +00:00
Ramon Roche
adb2df5ca7 feat(boards/modalai/voxl2): add Debian packaging framework
Add a scalable .deb packaging framework for VOXL2, built on the
existing cmake/package.cmake CPack infrastructure. The framework
handles multi-processor boards by having the POSIX (_default) build
own the .deb and pull in the companion SLPI build's artifacts.

Board-specific files:
- cmake/package.cmake: CPack variable overrides (name, deps, version)
- cmake/install.cmake: install() rules for all .deb contents
- debian/postinst: px4-* symlinks, DSP signature, directory setup
- debian/prerm: service stop, symlink cleanup
- debian/voxl-px4.service: systemd unit (after sscrpcd)

Infrastructure changes:
- cmake/package.cmake: hook for board-specific CPack overrides
- platforms/posix/CMakeLists.txt: hook for board install.cmake
- Makefile: %_deb pattern rule (build _default, then cpack -G DEB)
- CI: auto-discover _deb targets, collect .deb artifacts, upload
  to GitHub Releases

Future boards: add cmake/package.cmake + cmake/install.cmake and
CI discovers it automatically. No new file formats or tools needed.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-18 08:51:27 -07:00
Ramon Roche
2a4d473ba4
ci(ros): use matching branch for px4-ros2-interface-lib (#26781)
* ci(ros): use matching branch for px4-ros2-interface-lib

When running on release branches, the ROS integration tests now
check if a matching branch exists in px4-ros2-interface-lib and
clone it instead of always using main. This prevents build failures
caused by uORB message divergence between main and release branches.

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

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci(ros): dispatch release branch creation to px4-ros2-interface-lib

Add a standalone workflow triggered by the create event that fires a
repository_dispatch to Auterion/px4-ros2-interface-lib when a
release/X.Y branch is created. Also supports manual workflow_dispatch.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci(ros): add empty permissions block to dispatch workflow

Fixes code scanning alert about missing GITHUB_TOKEN permissions.
This workflow only uses a PAT secret, not GITHUB_TOKEN, so no
permissions are needed.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-18 07:49:36 -07:00
Ramon Roche
f11e2106af fix(ci): remove deprecated v1 cache API from container build
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 has broken container builds on main since March 12.

Removing the explicit version=1 parameter lets buildkit auto-detect
the v2 protocol, which is the only version now supported by both
GitHub (since April 2025) and RunsOn.

First build after this change will have a cold cache.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-13 13:59:54 -07:00
Hamish Willee
359b43e575
build(actions): Crowdin download to a conventional commit (#26705) 2026-03-11 16:46:56 +11:00
Ramon Roche
4da97eb4fd ci(workflows): add commit message and PR title quality checks
Add CI enforcement of conventional commit format for PR titles and
commit messages. Includes three Python scripts under Tools/ci/:

- conventional_commits.py: shared parsing/validation library
- check_pr_title.py: validates PR title format, suggests fixes
- check_commit_messages.py: checks commits for blocking errors
  (fixup/squash/WIP leftovers) and advisory warnings (review-response,
  formatter-only commits)

The workflow (.github/workflows/commit_checks.yml) posts concise
GitHub PR comments with actionable suggestions and auto-removes them
once issues are resolved.

Also updates CONTRIBUTING.md and docs with the conventional commits
convention.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-03-06 17:51:54 -08:00
Hamish Willee
fd7edaa4fe
Minor tweak to markup instructions for docs (#26168) 2026-02-19 17:27:43 +11:00
Ramon Roche
864df9fc7b CI: disable VTOL and tailsitter SITL tests
Persistent flaky failures (timeouts, erratic transitions) make these
tests unreliable in CI. Commented out from the workflow matrix so they
can be re-enabled once the test infrastructure is stabilized. The test
definitions in sitl.json are preserved for local use.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-17 09:30:18 -08:00
Ramon Roche
32c94bd3b1 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 06:29:13 -08:00
Matthias Grob
14cbcee49f 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 13:39:50 +01:00
Ramon Roche
d9b3e48ec5 CI: improve clang-tidy workflow naming and use standard cache actions
Rename workflow to "Static Analysis" with job name "Clang-Tidy" for
clearer GitHub Checks UI. Use Title Case action-verb step names.
Switch from runs-on/cache to actions/cache since the runs-on Magic
Cache sidecar transparently handles S3 backing.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche
29fefeeada CI: fix ccache key to use branch name instead of merge ref
github.ref_name resolves to '26367/merge' for pull_request events,
causing cache misses. Use github.head_ref (PR source branch) with
fallback to github.ref_name for push events.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche
618a6aa98f CI: add explicit permissions block to clang-tidy workflow
Set minimal permissions (contents: read) as flagged by CodeQL.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche
8a007d38e7 CI: split ccache into restore/save so cache persists on failure
Use separate cache/restore and cache/save steps with if: always()
on the save step, matching the build_all_targets pattern.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche
e831c66ae1 CI: add ccache and S3 caching to clang-tidy workflow
- Switch from addnab/docker-run-action to native container directive
- Use runs-on 16-core runner with S3 cache (extras=s3-cache)
- Add ccache setup matching build_all_targets pattern
- Run clang-tidy with -j16 to leverage all cores

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche
021eee0c5c CI: use 16-core runs-on runner for clang-tidy workflow
The free GitHub runner (4 vCPUs) takes ~22 minutes. Switch to a
16-core runs-on runner and bump parallelism to -j16 to reduce
clang-tidy analysis time.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Ramon Roche
385450ca37 CI: pin clang-tidy workflow to px4-dev:v1.17.0-beta1 container
Pin the container image to v1.17.0-beta1 which includes clang-tidy 18
and all required clang dependencies pre-installed. This removes the
need to install clang-tidy via apt on each workflow run.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 21:20:27 -08:00
Marco Hauswirth
c29630f6ae adjust clang-tidy checks and workflow 2026-02-12 21:20:27 -08:00
Ramon Roche
731d754a15 ci: enable VOXL2 CI builds with private Docker container
Remove modalai_voxl2 and qurt from CI exclusion lists and add
container overrides to use the private ghcr.io/px4/px4-dev-voxl2
image which contains the Qualcomm Hexagon SDK.

- Add voxl2 build group with x64 runner for cross-compilation
- Add GHCR credentials to workflow for private container pull
- Add packages:read permission to workflow
- Auto-build libfc_sensor.so stub during cmake configure
- Handle missing .px4/.elf gracefully in artifact packaging

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-12 12:00:25 -08:00
Ramon Roche
8bb1e44c10 ci: fix deploy-aws skipped due to upstream always() propagation
When build-site uses always() in its if condition, the skipped status
from its upstream dependencies propagates to deploy-aws which lacks
always(). Add always() with explicit success checks to ensure deploy
runs when both metadata-regen and build-site succeed.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-11 15:00:16 -08:00
Ramon Roche
01b348c86b ci: install Node.js and Yarn inside container for metadata-regen
The metadata-regen job runs inside the px4io/px4-dev container which
has no Node.js. The actions/setup-node action only installs on the
host runner, not inside the container, causing yarn: not found errors.

Replace actions/setup-node with direct Node.js installation via
NodeSource and enable corepack for Yarn support.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-11 14:35:27 -08:00
Ramon Roche
907823f9c5 ci: skip build-site on PRs without docs/source changes
Add a docs filter to detect-changes and gate build-site so it is
skipped when a PR only touches the workflow YAML file.  Push and
dispatch triggers are unaffected.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-11 13:46:44 -08:00
Ramon Roche
d886db8aab ci: trigger docs orchestrator on workflow file push to main
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-11 13:46:44 -08:00
Ramon Roche
1c929da8ba ci: fall back to main version for PR site builds
The version guard rejects non-main/release branches, but build-site
also runs on PRs where the branch name is arbitrary. Default to "main"
for PR builds since deploy-aws is skipped anyway.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-11 13:46:44 -08:00
Ramon Roche
42b0061217 ci: comprehensive docs-orchestrator audit and fixes
- Add safe.directory + fetch-depth: 0 for container jobs
- Support workflow_dispatch in metadata-regen and deploy-aws
- Guard PR comments against fork PRs
- Add ccache save to pr-metadata-regen
- Use metadata_sync.sh --generate --sync instead of manual steps
- Fix msg_docs source path in metadata_sync.sh
- Guard set-version against non-release branches
- Clean up build-site needs list

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-11 13:46:44 -08:00
Julian Oes
caf9feba73 CI: fix set-output deprecation warning 2026-02-12 09:17:33 +13:00
Ramon Roche
4c866fc9b2 ci: fix docs orchestrator docker image
The docs-orchestrator workflow referenced px4io/px4-dev-nuttx-focal:2024-11-07
which does not exist on Docker Hub, causing the T2: Metadata Sync job
to fail on push to main.

Use px4io/px4-dev:v1.17.0-beta1 which has all required toolchains.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:54:41 -08:00
Ramon Roche
93fd9d4bae ci: fix empty file error in docs link check PR comment
The sticky-pull-request-comment action requires a non-empty file
when using the path input. When the filtered link checker finds no
broken links in changed files, it produces an empty file causing
the action to fail with "Either message or path input is required".

Ensure the results file always has content by writing a fallback
message when the file is missing or empty.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:09:19 -08:00
Ramon Roche
06bb7a6e1b ci: rename orchestrator jobs with tier prefixes
Prefix job names with T1-T4 to make the execution order and dependency
chain visible at a glance in the GitHub Actions UI.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:09:19 -08:00
Ramon Roche
d63f47b5b3 ci: add orchestrator workflow file to PR path triggers
After a force push, GitHub evaluates path filters against only the
pushed commits, not the full PR diff. Changes to the orchestrator
workflow file itself were not matching the docs/** path filter,
preventing the orchestrator from running on the PR.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:09:19 -08:00
Ramon Roche
61a67b3a09 ci: harden docs orchestrator before merge
- Add [skip ci] to auto-commit message to prevent infinite workflow loop
- Add source paths (src/, msg/, ROMFS/, Tools/module_config/) to push
  triggers so metadata regenerates on source-only changes
- Move permissions from workflow-level to job-level (least privilege)

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:09:19 -08:00
Ramon Roche
0966e92e36 docs: fix flaw checker paths
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:09:19 -08:00
Ramon Roche
273d3cedac ci: fix jq parse error in changed files list step
Pass the changed files JSON through an environment variable instead
of direct interpolation to avoid shell quoting issues.

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
2026-02-10 22:09:19 -08:00