Repository navigation
feat(ci): add ESP-IDF component-build smoke test (esp32dev_idf5_component) - #3734
Conversation
…nent) Adds a compile leg that builds via ESP-IDF's genuine CMake/idf.py component system (framework="arduino, espidf", CONFIG_AUTOSTART_ARDUINO=y runs the .ino sketch from inside an IDF app_main) instead of PlatformIO's Arduino-only source-discovery build. This exercises the real idf_component_register()/CMakeLists.txt path — the distribution mechanism #2121 (idf component registry) depends on — and, combined with #3715's other changes (which made the IDF-native code path the default rather than something gated behind "Arduino absent"), the same native code a true bare-IDF build would use. Not a substitute for a genuine app_main()-only (no Arduino.h at all) bare-IDF build — ARDUINO is still defined under CONFIG_AUTOSTART_ARDUINO. That remains a larger follow-up (a dedicated main/ harness project, plus IDF 4.4/6.x legs) tracked by #3724. Part of #3715. Closes #3724 (partial: component-build leg landed; true app_main()-only bare-IDF harness is a follow-up). Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an ESP32 IDF 5 component-build board definition and a GitHub Actions workflow that runs the Blink example through the reusable build template on relevant pushes and pull requests. ChangesESP-IDF component CI
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8).github/workflows/build_esp32dev_idf5_component.ymlTraceback (most recent call last): Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build_esp32dev_idf5_component.yml:
- Around line 48-54: Expand the pull_request paths for the ESP32 IDF5 component
workflow to include all delegated-build inputs: core src/**, examples/Blink/**,
ci/compiler/pio.py, build_template.yml, PlatformIO metadata, and dependency
lockfiles. Mirror the corresponding path entries used by the workflow’s push
trigger while preserving the existing paths.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 150dbbfc-b269-40af-982b-610fb5e83666
📒 Files selected for processing (2)
.github/workflows/build_esp32dev_idf5_component.ymlci/boards.py
The pull_request trigger's path filter was narrower than push's, so a PR touching e.g. src/platforms/esp/32/drivers/rmt/** would trigger this leg on merge to master but not during review. Addresses CodeRabbit review on #3734. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Closes #3724 (partial — see scope note below). Part of meta #3715 (ESP Arduino-decoupling).
What this adds
A new CI leg,
esp32dev_idf5_component, that builds via PlatformIO'sframework = "arduino, espidf"— ESP-IDF's genuine CMake/idf.py component system, withCONFIG_AUTOSTART_ARDUINO=yrunning the.inosketch'ssetup()/loop()from inside an IDFapp_main. This is meaningfully different from every other ESP32 CI leg in this repo, all of which use PlatformIO's Arduino-only source-discovery build.Why this matters: it exercises the real
idf_component_register()/ rootCMakeLists.txtpath — the distribution mechanism #2121 (idf component registry) depends on — which no other CI leg touches. Combined with #3715's other merged changes (#3726/#3727/#3728/#3730/#3732/#3733, which made the IDF-native code path the default rather than something gated behind "Arduino absent"), this build exercises nearly all the same native code a true bare-IDF build would use.What this does NOT prove (scope note, matches #3724's own acceptance criteria)
This is not a substitute for a genuine
app_main()-only build with<Arduino.h>completely unavailable —ARDUINOis still defined here (Arduino runs as an IDF component viaCONFIG_AUTOSTART_ARDUINO). A true bare-IDF harness needs a dedicatedmain/component project (no.ino, no Arduino core at all), which is a larger follow-up:app_main()-only harness (no Arduino anywhere in the build)#include <Arduino.h>fails the bare leg")Filing/tracking the remainder as explicit follow-up rather than rushing an unvalidated multi-leg matrix in this pass.
Scope guard (from the ESP32-C2 precedent in
ci/boards.py): the dual"arduino, espidf"component build does not auto-discover example.cppfiles in subdirectories (examples/Codec/,examples/Downscale/, etc.) — only single-file.inoexamples are safe. This board is scoped toBlinkonly.Local validation
bash lint(full — python/cpp/js) — cleanbash compile esp32dev_idf5_component --examples Blink— build succeeds, produces a validfirmware.binvia the real ESP-IDF CMake build (flash 645471 bytes / 15.4%)RAM: 345.54KB / 320.00KB (108.0%)for this build — over the reported static RAM budget. The build still succeeds and links (a genuine overflow would be a linker error, not a successful build with valid artifacts), so this looks like a memory-report metric quirk for this specific dual-runtime (Arduino-as-IDF-component) framework combination rather than an actual overflow, but I want to flag it explicitly rather than bury it — worth a maintainer's eyes before relying on this leg's green checkmark as proof of runtime correctness. Flash usage (15.4%) is unremarkable.Test plan
bash lint— cleanbash compile esp32dev_idf5_component --examples Blink— compiles and links (with the RAM-report caveat above)Summary by CodeRabbit