Commit Graph
12 Commits
Author SHA1 Message Date
Peter BarkerandClaude Fable 5 1f6e646d2a Tools: add --progress-file option to build_boards and size_compare_branches
pre-commit / ci (push) Canceled after 0s
test scripts / build (astyle-cleanliness) (push) Canceled after 0s
test scripts / build (check_autotest_options) (push) Canceled after 0s
test scripts / build (logger_metadata) (push) Canceled after 0s
test scripts / build (param-file-validation) (push) Canceled after 0s
test scripts / build (param_parse) (push) Canceled after 0s
test scripts / build (python-cleanliness) (push) Canceled after 0s
test scripts / build (shellcheck) (push) Canceled after 0s
test scripts / build (validate_board_list) (push) Canceled after 0s
size_compare_branches wrote its progress CSV to the hardcoded path
/tmp/some.csv; make the destination a command-line option, and write
no progress file at all when the option is not given.  The write
helper lives in the shared base class, and build_boards gains the
same option, writing task counts, remaining tasks and failures as
builds complete (in both parallel and sequential modes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 11:41:31 +10:00
Peter BarkerandClaude Opus 4.8 4be67e3e25 Tools: enforce one allowed subsystem per commit in CI
Add check_commit_subsystems() to check_branch_conventions.py, which uses
the allowed_subsystems library to verify, for every commit on the branch,
that:

  - the declared subsystem prefix is an allowed subsystem (a libraries/
    directory, a directory the commit creates, or a curated extra), and
  - every file changed in the commit belongs to that subsystem.

When a file does not belong to the declared subsystem the error lists the
subsystem(s) it could be part of; when the prefix itself is unknown the
error suggests the closest allowed name ("did you mean ...?").  Revert and
fixup! commits are skipped (handled by the existing checks).  This runs in
the existing test_branch_conventions.yml workflow; no CI configuration
change is required.

The generic git helpers get_added_paths_for_commit() and
created_library_dirs() live on BuildScriptBase so other build scripts can
reuse them.  Register allowed_subsystems as a known-first-party module in
pyproject.toml so the new import sorts correctly under ruff/isort.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 08:08:08 +10:00
Peter Barker 827c11a600 autotest: create a new build_boards.py
shares most code with size_compare_branches.py - just configures/builds boards based on board_list
2026-07-01 21:47:13 +10:00
Pierre Kancir 8d225aa7e7 Tools: build_script_base: make BuildScriptBase base class and progress_prefix abstract
this prevent linter to trigger on none existing progress_prefix on the base class
Child class will now have TypeError if they don't implement  progress_prefix
2026-05-27 08:50:02 +10:00
Pierre Kancir da8bd63a35 Tools: build_script_base: fix call error return 2026-05-27 08:50:02 +10:00
Peter Barker bc1aa19b28 Tools: avoid errors for catching bare exception 2026-03-23 08:14:01 +11:00
Christian Clauss a7aabe4d5b Tools: Fix ruff rule E402 Module level import not at top of file 2026-03-21 17:27:49 +11:00
Peter Barker 7fcbfddfed Tools: add size_history.py - a tool to visualize size changes over time
Quick-and-dirty, but functional.
2026-03-04 18:16:58 +11:00
Peter Barker f33e6911c8 Tools: allow size_compare_branches.py to test boards with modified hwdefs 2026-02-25 18:26:41 +11:00
Peter Barker cfac833c21 Tools: emit progress to stderr not stdout
mixing the progress with stdout is causing problems for tools trying to consume stdout:

[update.py]: feature EF: Running (arm-none-eabi-nm --demangle --print-size /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
[update.py]: feature EF: Running (strings /home/autotest/build/tmp/binaries.build/ZeroOneX6_Air/bin/blimp) in (.) (ZeroOneX6_Air,Blimp) not in build_options.py
2025-12-28 19:16:16 -06:00
Peter Barker 9aaa60bdb5 Tools: create and use a progress_prefix method 2025-12-09 11:55:49 +11:00
Peter Barker 66d7ecfb73 Tools: extract BuildScriptBase from size_compare_branches.py
Create a base class for build scripts that provides common utilities extracted from size_compare_branches.py:
- run_program(): Execute commands with output handling
- run_waf(): Run waf with consistent build environment
- run_git(): Run git commands
- find_current_git_branch_or_sha1(): Get current branch/SHA
- find_git_branch_merge_base(): Find merge base

Refactor size_compare_branches.py to use the base class, reducing duplicated code.

Other scripts with similar patterns can be refactored in the future:
- build_binaries.py
- build_bootloaders.py
- build_iofirmware.py
- build_peripherals.py
- configure_all.py
2025-12-09 11:55:49 +11:00