Commit Graph
269 Commits
Author SHA1 Message Date
Peter Barker 3cf3e885dc .github: fix md whitespace-around-headers (MD012 and MD022) 2026-02-15 00:00:00 +11:00
Peter Barker 5c9989ce0c .github: fix trailing punctuation in markdown headers (MD026)
makes a lot of these headings consistent with other headings at the same level in these files!
2026-02-14 12:02:51 +11:00
Peter Barker 0eef0f4c39 .github: correct us of emphasis in place of headings (MD036) 2026-02-13 11:13:01 +11:00
Peter Barker db49265ecf .github: fix MD041 (single # header at top of file) in all markdown 2026-02-12 10:18:06 +11:00
Peter Barker 8bee10b129 .github: tighten commit message rules
we already allow all sorts of stuff in here... so we can't be too strict
2026-02-10 11:19:18 +11:00
Peter BarkerandClaude Opus 4.5 803a5c34f9 .github: convert bare URLs to proper markdown links
Fix MD034/no-bare-urls lint errors by converting bare URLs to proper
markdown link syntax [text](url). Link text is derived from the URL:
- GitHub repos use the repository name
- ArduPilot ecosystem URLs use descriptive names
- Vendor/product URLs use the vendor name
- Documentation sites include "documentation" suffix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 15:38:01 +11:00
Peter Barker e90b2ecee1 .github: fix MD025 (too few # in headings) in all markdown files 2026-02-07 07:36:26 +11:00
Peter Barker efb367e7c2 .github: test_branch_conventions.yml: limit commit subject to 160 characters
sometimes people just forget the linefeed between the subject and commit message body.

Add a very loose limit to try to catch the problem.
2026-02-05 09:39:36 +11:00
Peter BarkerandClaude Opus 4.5 7ceb7c31c7 global: fix whitespace issues in markdown files
global: fix MD007 unordered list indentation in markdown files

Normalize unordered list indentation to use 2-space multiples:
- Top-level list items start at column 0
- Nested list items use 2 additional spaces per level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD009 trailing whitespace in markdown files

Remove trailing whitespace from all affected markdown files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD010 hard tabs in markdown files

Replace hard tab characters with 4 spaces.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD012 multiple consecutive blank lines in markdown

Collapse multiple consecutive blank lines to single blank lines
across all markdown files (excluding vendored code).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

global: fix MD007 list indentation base level in markdown

Shift list indentation left by 2 spaces so top-level list items
start at column 0 instead of column 2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank lines around headings in markdown

Ensure headings are surrounded by blank lines as required by
markdownlint MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD032 blank lines around lists in markdown

Ensure lists are surrounded by blank lines as required by
markdownlint MD032 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD031 blank lines around code blocks in markdown

Ensure fenced code blocks are surrounded by blank lines as required
by markdownlint MD031 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD047 files should end with single newline

Ensure all markdown files end with exactly one newline character
as required by markdownlint MD047 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD023 headings must start at beginning of line

Remove leading whitespace from heading lines as required by
markdownlint MD023 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD007 remaining list indentation in markdown

Fix unordered list indentation to use correct spacing as required
by markdownlint MD007 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD030 spaces after list markers in markdown

Reduce multiple spaces after list markers to single space as
required by markdownlint MD030 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank lines around setext headings

Ensure setext-style headings (underlined with === or ---) are
surrounded by blank lines as required by markdownlint MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD018 missing space after hash in headings

Add space after hash marks in atx-style headings as required by
markdownlint MD018 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD019 multiple spaces after hash in headings

Reduce multiple spaces after hash marks to single space in
atx-style headings as required by markdownlint MD019 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD012 multiple consecutive blank lines in markdown

Remove multiple consecutive blank lines and ensure files end with
exactly one newline as required by markdownlint MD012 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD023 headings with leading whitespace

Remove leading whitespace from setext-style heading text lines
as required by markdownlint MD023 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD022 blank line after heading in markdown

Add missing blank line after heading as required by markdownlint
MD022 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD009 trailing non-breaking space in markdown

Remove trailing non-breaking space (U+00A0) as required by
markdownlint MD009 rule.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Tools/scripts: fix MD012 remaining multiple blank lines in markdown

Remove leading blank lines and whitespace-only lines that create
multiple consecutive blank lines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:37:38 +11:00
Peter Barker c1e8d26b33 .github: lint markdown files if they are added or modified 2026-02-03 12:18:43 +11:00
Peter Barker 8d7419c7eb .github: add cancel-in-progress to a pair of workflows
this means if you push your branch existing running workflows will be cancelled
2026-01-29 08:16:03 +11:00
Peter Barker d6a255dc3d .github: timeout colcon workflow after 60 minutes
this one can get stuck for 10 hours - it doesn't take that long to pass!
2026-01-27 09:29:53 -06:00
dependabot[bot] 986c492ee1 .github: Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/cache](https://github.com/actions/cache) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/cache` from 4 to 5
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

Updates `actions/upload-artifact` from 5 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-20 07:59:49 +11:00
Peter Barker 9585e160e7 .github: ccache: amend fmuv6/Durandal similarity tests
Durandal is no longer using feature detection, meaning we can expect more divergence
2026-01-13 11:00:56 +11:00
Peter Barker a504f65126 .github: ensure new boards configure and build
Add a step to test_branch_conventions.yml to build and test any boards
that are modified in a PR using test_new_boards.py.

Also fix git references to use github.event.pull_request.base.ref
instead of github.base_ref for consistency, add container and
submodule support to the workflow.
2025-12-09 11:55:49 +11:00
dependabot[bot] 23ccb666b0 .github: Bump actions/checkout from 5 to 6 in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-26 20:45:09 +11:00
Peter Barker bc67e8a4d4 .github: add some words to CONTRIBUTING.md about issue assignment 2025-11-26 12:24:59 +11:00
Thomas Watson 822a8686aa .github: hack ros2 launch library to not hide exceptions
Reveal the true cause for most of our colcon failures by no longer
redirecting the exception to `/dev/null`.

The test harness tolerates failures in our processes during shutdown
(which cause most of the printed error messages), but can throw internal
errors which cause `AssertionError: When running test <x> launch service
failed when finishing, return code '1'` in `finalize_launch_service`.

By default it just discards the actual exception with the helpful
message `Error: [launch]: Caught exception in launch (see debug for
traceback)`. Edit the source code to default debug mode to on so the
exception is printed and we can see what is actually going on. Sadly,
there appears to be no more sensible approach.

This shows that we need
https://github.com/ros2/launch/commit/801d7cda05a87a74d59cb3d4752307d001956584
which we should get if we update the Docker images.

There are still some failures due to startup errors on ArduPilot's side
but this cause appears to be the majority of them. And if there are
other sources of this exception the traceback will enable us to see
them.
2025-11-09 11:48:33 -06:00
dependabot[bot] 7003cdbbfb .github: Bump actions/upload-artifact in the github-actions group
Bumps the github-actions group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/upload-artifact` from 4 to 5
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-09 10:03:08 +11:00
Erkan Vatan 85f2b291ed CI: build t3-gem-o1 board 2025-10-27 18:43:16 -05:00
Thomas Watson 4ab844ed46 .github: optimize esp32 install and build
Python 3.11 was never actually used, so skip installing it.

The installer was run twice, but only the second did anything,
so delete the first run.
2025-10-08 07:45:15 +01:00
Thomas Watson 7165ea23cb .github: downgrade pydantic for ESP-IDF install
A recent change has broken ESP-IDF. Downgrade until upstream fixes.
2025-10-08 07:45:15 +01:00
dependabot[bot] ce84145c2a .github: Bump actions/setup-python in the github-actions group
Bumps the github-actions group with 1 update: [actions/setup-python](https://github.com/actions/setup-python).


Updates `actions/setup-python` from 5 to 6
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-29 16:37:34 +10:00
Yuri Rage 08336cb3ef Tools/environment_install: add Debian Trixie 2025-09-18 15:44:54 +10:00
Thomas Watson 907f9b4b92 CI: fail fast on rover PPP install
Ensure that ppp install succeeded and the binary executes directly after
install, instead of failing deep in the test suite.
2025-09-06 11:40:36 +01:00
Ryan Friedman a7e623e474 .github: pin/bump MicroXRCEDDSGen
* https://github.com/ArduPilot/Micro-XRCE-DDS-Gen/releases/tag/v4.7.1
* Fixes race in generator that causes often CI failures

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2025-09-04 20:10:21 +01:00
Christian Clauss 128e46aa48 precommit: Add pre-commit hook to check copyright in ros2 files 2025-09-03 14:45:28 +01:00
Christian Clauss ce6dc895fb pre-commit: Add a job that runs ament_pep257 Tools/ros2
[`Tools/ros2/ardupilot_dds_tests/test/test_pep257.py`](https://github.com/ArduPilot/ardupilot/blob/master/Tools/ros2/ardupilot_dds_tests/test/test_pep257.py) ensures [PEP 257 – Docstring Conventions](https://peps.python.org/pep-0257) compliance for all Python files in Tools/ros2.

Partially addresses the concern at
* https://github.com/ArduPilot/ardupilot/pull/30426#issuecomment-2994329025

Here are two solutions (we should pick just one) that replicate this functionality in pre-commit.
1. Use `flake8` plus `flake8-docstring` to run the 'ament-style` rules on Tools/ros2.
2. Run [`ament_pep257`](https://pypi.org/project/ament-lint-pep257) on Tools/ros2.

Quick equivalent commands:
```
uv tool run --with=flake8-docstrings flake8 --select=D \
    --ignore=D100,D101,D102,D103,D104,D105,D106,D107,D203,D212,D404 Tools/ros2

uv tool run --from=ament-lint-pep257 ament_pep257 Tools/ros2  > /dev/null
```
How was this tested?
1. Run both equivalent commands to ensure no errors.
2. `pre-commit run flake8 --all-files` to ensure no errors.
3. `pre-commit run ament-pep257 --all-files` to ensure no errors.

Edit `Tools/ros2/ardupilot_sitl/src/ardupilot_sitl/utilities.py` and add a leading or trailing space inside the docstring, and save the file.

Rerun the four commands to ensure that each raises a `D210: No whitespaces allowed surrounding docstring text` error.
2025-09-03 14:43:26 +01:00
Peter Barker 6cdd42a8e1 .github: create PlaneTests1c to hold malfunctioning test/s
allows for moving a test which we want to continue to run into a suite which runs quickly.  Means retrying doesn't take so much CI time up.
2025-08-23 10:16:12 +10:00
dependabot[bot] 80eff2554e .github: Bump actions/checkout from 4 to 5 in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-19 23:50:33 -05:00
Peter Barker fa554d74bb .github: set dummy GIT_VERSION_EXTENDED for repeatible bootloader builds 2025-08-04 09:12:59 +01:00
Iampete1 672533492f actions: test scripting: run_lua_language_check: run with debug logging 2025-07-28 09:46:01 +10:00
dependabot[bot] 8d093552a7 .github: Bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [cygwin/cygwin-install-action](https://github.com/cygwin/cygwin-install-action) and [andstor/file-existence-action](https://github.com/andstor/file-existence-action).


Updates `cygwin/cygwin-install-action` from 5 to 6
- [Release notes](https://github.com/cygwin/cygwin-install-action/releases)
- [Commits](https://github.com/cygwin/cygwin-install-action/compare/v5...v6)

Updates `andstor/file-existence-action` from 2 to 3
- [Release notes](https://github.com/andstor/file-existence-action/releases)
- [Commits](https://github.com/andstor/file-existence-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: cygwin/cygwin-install-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: andstor/file-existence-action
  dependency-version: '3'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-15 14:43:18 -05:00
Christian Clauss f0810fa91f .github: Keep Actions up to date with GitHub's Dependabot
* ArduPilot/pymavlink#1065
* [Keeping your software supply chain secure with Dependabot](https://docs.github.com/en/code-security/dependabot)
* [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot)
* [Configuration options for the  file - package-ecosystem](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem)
2025-07-15 09:57:43 +10:00
Peter Barker e9da6bd4d0 .github: remove dump-github diagnostic step
github is making the variable substition, leading there to there being a closing quroate on the echo line within the existing single quotes.  That's bad when shell is parsing that line; it starts to try to run it as a shell script

This was just supposed to make life easier for the next person seeing what was in this object - so we can just remove it.
2025-07-08 23:07:10 +10:00
Peter Barker cb84a8e82e .github: branch conventions: correct fetching of delta-commits for checking
turns out origin isn't the place you're merging into when you use the workflow with ref:
2025-07-08 05:46:31 +10:00
Peter Barker 6911910517 .github: print Python3 version out as part of preparing env 2025-07-06 10:04:04 -05:00
Peter Barker e58a0e7719 .github: test_branch_conventions.py: test for fixup commits and commits lacking a : 2025-07-06 23:24:32 +10:00
Thomas Watson d445f1675a .github: fix test size to compare size of no-version binaries
Somewhat unbelievably, the commit hash having certain values can
actually change the size of the binary. GCC might be able to identify
another string as a suffix of the commit hash string and therefore be
able to omit that other string and replace it with a pointer into the
middle of the commit hash string. This has been observed of the cause of
spurious size differences in CI.

The `no_version` binaries with constant commit hashes are the ones that
are compared for features and contents, and they are compatible with the
size compare script, so let's compare their sizes instead.

This does beg the question as to why we re-compile with these
environment variables instead of starting with them (perhaps ccache?),
nor why we manually set them instead of using the relevant `waf` flag,
but those can be future improvements.
2025-07-06 20:19:59 +10:00
Thomas Watson 339aae4fa5 .github: fix test size workflow to ignore abin files
`*.elf` files don't exist (the built ELF files instead have no
extension). `*.apj` and `*.abin` files both have git hashes inside so
they will always differ. Correctly ignore them and compare only ELF and
`*.bin`.

Also rename the action as it compares the full file, not a checksum.

Avoids always claiming that MatekH743-bdshot has a difference.
2025-07-06 12:37:25 +10:00
Peter Barker 54d049f806 .github: add test that there are no Merge commits in the branch 2025-07-02 19:33:08 +10:00
Christian Clauss 511e8d8ad6 colcon: Use current flake8 in GitHub Action
This GitHub Action fails occasionally, so let's upgrade its flake8 to see if that provides more stable runs.

https://pypi.org/project/flake8 --> v7.2.0

flake8: Both the local issue and the flake8 issue it points to were closed 4 or 5 years ago, so let's test with current flake8.
2025-06-26 18:56:13 +10:00
Christian Clauss f5514dd578 Add pre-commit to GitHub Actions
In a GitHub Action, run `pre-commit run --all-files` on all pull requests.

Fixes: #24555
2025-06-25 15:09:57 +10:00
Rhys Mainwaring b1ffad7abb Tools: ros2: increase pytest verbosity and run stepwise
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2025-06-22 18:07:55 +10:00
Christian Clauss 82f8febe3c colcon: Use current MAVProxy in GitHub Action
This GitHub Action fails occasionally, so let's upgrade its MAVProxy to see if that provides more stable runs.
* https://pypi.org/project/MAVProxy --> v1.8.71

Given the changes in MAVProxy, should we upgrade?
* https://github.com/ArduPilot/MAVProxy/releases

---

`pip install -U` can be quite opaque to readers because `pip install` currently has six `--u*` options.
% `python3 -m pip install --help | grep "\-\-u"`
```
  --user                      Install to the Python user install directory for
  -U, --upgrade               Upgrade all specified packages to the newest
  --upgrade-strategy <upgrade_strategy>
  --use-pep517                Use PEP 517 for building source distributions
  --use-feature <feature>     Enable new functionality, that may be backward
  --use-deprecated <feature>  Enable deprecated functionality, that will be
```
2025-06-20 17:23:14 -05:00
Ryan Friedman e8af50da32 .github: Pin uXRCEDDSGen and use depth 1
* Allows development to proceed on master without breaking ardupilot
  again

Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
2025-06-20 21:26:18 +10:00
Thomas Watson 1c3297a67b .github: upgrade Cygwin to use Python 3.9
Python 3.12 is also available, but some packages are not.
2025-06-19 21:27:25 +10:00
Peter Barker 0ba11a5d65 .github: install microxrceddsgen from source
... until image is udpated
2025-06-12 16:58:33 +10:00
Bob Long 9ab96d7539 .github: add parameter validation to CI 2025-06-10 22:14:13 +10:00
Peter Barker 0bf65c3a87 .github: adjust workflow for change in github workspace path
changing the permissions seems to change the path to the workspace; use the supplied variable for what it's good for
2025-06-10 08:50:33 +10:00