Repository navigation
Description
Problem
ci/ci-cppcheck.py is the only entry point for C++ static analysis in FastLED CI. It works by:
- Searching
.build/pio/<board>/for aplatformio.ini. cd-ing into that project dir.- Invoking
pio check --skip-packages --src-filters=+<src/> --severity=medium --fail-on-defect=high ....
This pipeline assumes PlatformIO was the backend that compiled the board. When fbuild is the active backend (as on esp32c2, esp32s3, esp32c3, esp32c6 today, expanding over time), the partition CSV (e.g. huge_app.csv) and other IDF-side build metadata never get copied into .build/pio/<board>/, so pio check fails during CMake configure with:
Missing partition table file `/home/runner/work/FastLED/FastLED/trusted/.build/pio/esp32c2/huge_app.csv`
UserSideException: Processing esp32c2 ...
See the esp32c2 workflow on master, red every run since #2292: https://github.com/FastLED/FastLED/actions/workflows/esp32c2.yml?query=branch%3Amaster
Confirmation that fbuild has no check feature
ci/util/fbuild_adapter.py exposes only:
fbuild_build_and_uploadfbuild_build_onlyis_fbuild_availableget_fbuild_version
No check / lint / analyze / cppcheck API. The underlying fbuild daemon (per ci/util/fbuild_runner.py) is a compile-and-cache tool; static analysis is out of its current scope.
What needs to happen
ci/ci-cppcheck.py (and any future lint/analysis step) must work against fbuild-compiled boards. Two reasonable directions:
- Direct cppcheck invocation against fbuild output. Use fbuild's
compile_commands.json(or derive it) and runcppcheckdirectly, bypassingpio checkentirely. Benefits: no PIO project-tree assumption, no partition-CSV dependency, faster. - Mirror the PIO metadata fbuild needs for
pio check. Populate.build/pio/<board>/<Example>/with whateverpio checkneeds — resolvedhuge_app.csv,sdkconfig, etc. — regardless of which backend compiled. This reuses the old mirror pattern that refactor(ci): drop fbuild→.pio mirror; read merged-bin from active backend #2299 just dropped for merged-bin, but only for the cppcheck scope.
Option 1 is cleaner architecturally and removes the PIO dependency for analysis. Option 2 is easier to get landed but keeps the backend-coupling that #2299 was moving away from.
Scope
ci/ci-cppcheck.py— rework to detect backend and dispatch appropriatelyci/util/fbuild_adapter.py— optionally add afbuild_cppcheckhelper (or exposecompile_commands.jsonlocation)- Workflow YAMLs (
esp32c2.yml, etc.) — no change needed if the script handles it transparently
Blocks
- CI regression: esp32c2 CPP Check fails —
pio checkcan't resolvehuge_app.csvafter fbuild compile #2302 — esp32c2 CI regression tracker - Any future fbuild migration for additional boards (esp32s3/c3/c6 currently also affected)
- fbuild: integrate with clang-tool-chain-bin for IWYU and C++ static analysis #2303 — fbuild + clang-tool-chain integration (umbrella: covers cppcheck, IWYU, and future linting tools)
References
- Failing job example (master, commit
7852db6f7): https://github.com/FastLED/FastLED/actions/runs/24598125268 - Failing job example (PR feat: fix #2254 SPI long-strip bug + enable RMT RX DMA streaming #2300, same error): https://github.com/FastLED/FastLED/actions/runs/24598333609/job/71932535730
- Mirror-was-added: fix(ci): repair all four emulation workflows (ESP32 QEMU + AVR8JS Uno) #2285 (5d3ca30)
- Mirror-moved-later: fix(ci): mirror fbuild artifacts AFTER pio metadata gen (AVR8JS+QEMU still red) #2291 (de11566)
- Mirror-was-dropped: refactor(ci): drop fbuild→.pio mirror; read merged-bin from active backend #2299 (7852db6)
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTriage
Activity
fix(ci): skip pio check on fbuild-compiled boards to unblock esp32c2 CI
feat(ci): route cppcheck through fbuild compile_commands.json
fix(ci): skip pio check on fbuild-compiled boards to unblock esp32c2 …
feat(ci): route static analysis through clang-tool-chain-tidy + fbuil…