Repository navigation
ci: run cppcheck per env in parallel and cache compiles with ccache - #64
Merged
Merged
Conversation
cppcheck ran all default_envs one after another in a single job (~15 min, the longest job). A matrix runs one job per env. Firmware builds compiled cold every run, including the ESP-IDF libs of custom_sdkconfig envs. scripts/pio_ccache.py puts ccache in front of the compile commands and IDF_CCACHE_ENABLE covers the IDF CMake build; the ccache dir is cached per env. Pushes to the base branch build too so PR runs can restore that cache (caches don't cross between PRs). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfyyaRTSDYD7dU9G9rvCSv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Clankmaster · project thread
Before: a PR's CI took ~16.5 min (run 36633650555). The single cppcheck job took 15m16s, and every firmware build compiled from scratch in 5–12 min.
After: cppcheck runs as one job per
default_envsentry, and the firmware builds reuse a per-env ccache. Expected: ~12 min from the cppcheck split alone, then ~5–6 min once the cache is warm.How:
cppcheckbecomes a matrix overdefault, sticky, x4-pro, x4-classic, runningpio check -e <env>(the same env set a barepio checkwalks).scripts/pio_ccache.pyis a pre-script that prefixes the SCons compile commands with ccache whenXINK_CCACHEis set;IDF_CCACHE_ENABLE=1covers the ESP-IDF CMake build of custom_sdkconfig envs. The build job installs ccache and restores~/.cache/ccacheper env (400M cap). The cache stats print at the end of the build step.development, only so its cache is saved on the base branch: PR runs can restore base-branch caches but not other PRs' caches. The firmware artifact upload stays PR-only.🤖 Generated with Claude Code
https://claude.ai/code/session_01WfyyaRTSDYD7dU9G9rvCSv
Generated by Claude Code