fix(build): check submodules once per configure, never reset changes

Every px4_add_git_submodule call ran check_submodules.sh twice, at
configure and build time, and with CI=true force-updated each submodule
every time, a 2017 workaround for an interactive prompt that is gone.
VS Code and CLion force-updated too, resetting submodule changes under
development.

The check now runs once per configure. A missing submodule is fetched;
one at another commit is kept as it is, with a warning locally and an
error in CI.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Ramon Roche committed 2026-09-28 11:50:38 -07:00
1 parent b8d4f0b637
commit 14cf29bb31
6 files changed
+197 -85

No files matched your search

+3
View File
@@ -39,3 +39,6 @@ jobs:
run: |
flake8 Tools/ros2/*.py
python3 -m unittest discover -s Tools/ros2 -p 'test_*.py'
- name: Test submodule check
run: python3 -m unittest discover -s Tools -p 'test_check_submodules.py' -v