Skip to content

ci: run cppcheck per env in parallel and cache compiles with ccache - #64

Merged
prokrypt merged 1 commit into
developmentfrom
claude/project-thread-hy6cty
Sep 30, 2026
Merged

prokrypt merged 1 commit into
developmentfrom
claude/project-thread-hy6cty

Conversation

@prokrypt

Copy link
Copy Markdown
Owner

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_envs entry, 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:

  • cppcheck becomes a matrix over default, sticky, x4-pro, x4-classic, running pio check -e <env> (the same env set a bare pio check walks).
  • scripts/pio_ccache.py is a pre-script that prefixes the SCons compile commands with ccache when XINK_CCACHE is set; IDF_CCACHE_ENABLE=1 covers the ESP-IDF CMake build of custom_sdkconfig envs. The build job installs ccache and restores ~/.cache/ccache per env (400M cap). The cache stats print at the end of the build step.
  • The build job now also runs on pushes to 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

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
@prokrypt prokrypt self-assigned this Sep 29, 2026
@prokrypt
prokrypt merged commit 2dc4839 into development Sep 30, 2026
24 checks passed
@prokrypt
prokrypt deleted the claude/project-thread-hy6cty branch September 30, 2026 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants