Skip to content

feat(ci): add ESP-IDF component-build smoke test (esp32dev_idf5_component) - #3734

Merged
zackees merged 2 commits into
masterfrom
feat/esp32-ci-espidf-component-leg
Jul 22, 2026
Merged

zackees merged 2 commits into
masterfrom
feat/esp32-ci-espidf-component-leg

Conversation

@zackees

@zackees zackees commented Jul 22, 2026 •

Copy link
Copy Markdown
Member

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's framework = "arduino, espidf" — ESP-IDF's genuine CMake/idf.py component system, with CONFIG_AUTOSTART_ARDUINO=y running the .ino sketch's setup()/loop() from inside an IDF app_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() / root CMakeLists.txt path — 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 — ARDUINO is still defined here (Arduino runs as an IDF component via CONFIG_AUTOSTART_ARDUINO). A true bare-IDF harness needs a dedicated main/ component project (no .ino, no Arduino core at all), which is a larger follow-up:

  • IDF 4.4 and 6.x legs (this PR only adds one — the 5.x pin, the acceptance criteria's highest-priority ask)
  • A genuine app_main()-only harness (no Arduino anywhere in the build)
  • The negative-test proof ("a deliberately introduced #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 .cpp files in subdirectories (examples/Codec/, examples/Downscale/, etc.) — only single-file .ino examples are safe. This board is scoped to Blink only.

Local validation

  • bash lint (full — python/cpp/js) — clean
  • bash compile esp32dev_idf5_component --examples Blink — build succeeds, produces a valid firmware.bin via the real ESP-IDF CMake build (flash 645471 bytes / 15.4%)
  • ⚠️ Caveat found during validation: PlatformIO's memory-usage report shows 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.
  • Not flashed to real hardware / not runtime-verified on-device.

Test plan

  • bash lint — clean
  • bash compile esp32dev_idf5_component --examples Blink — compiles and links (with the RAM-report caveat above)
  • GitHub Actions CI run on this PR — will confirm whether the RAM figure is a report artifact or a real constraint on the CI runner's toolchain

Summary by CodeRabbit

  • New Features
    • Added CI coverage for ESP32 development-board builds using an ESP-IDF component build workflow.
    • Added a smoke-test target for the Blink example to validate both Arduino and ESP-IDF 5.3 build paths.
  • CI Improvements
    • Configured the workflow to run on relevant pushes and pull requests via path filtering, with concurrency controls to cancel in-progress runs for the same ref.

…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]>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fb4c4d7f-cbd7-4582-b9bf-221024d7c6c1

📥 Commits

Reviewing files that changed from the base of the PR and between 382e730 and 5296f03.

📒 Files selected for processing (1)
  • .github/workflows/build_esp32dev_idf5_component.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/build_esp32dev_idf5_component.yml

📝 Walkthrough

Walkthrough

Adds 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.

Changes

ESP-IDF component CI

Layer / File(s) Summary
ESP32 IDF 5 component board
ci/boards.py
Defines ESP32DEV_IDF5_COMPONENT for the esp32dev target with the ESP32 IDF 5.3 pioarduino platform, combined Arduino/ESP-IDF frameworks, and huge_app.csv partitions.
Component-build workflow
.github/workflows/build_esp32dev_idf5_component.yml
Adds path-filtered push and pull-request triggers and invokes the reusable build workflow for esp32dev_idf5_component with the Blink example.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR still uses Arduino as an ESP-IDF component, so it does not satisfy the linked issue's bare-IDF/no-Arduino acceptance criteria. Add true framework=espidf legs without Arduino, using a minimal app_main harness, and cover the 4.4/5.x/6.x matrix plus the negative Arduino dependency test.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the new ESP-IDF component-build CI smoke test.
Out of Scope Changes check ✅ Passed The added workflow and board constant are both directly tied to the ESP-IDF component-build CI objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/esp32-ci-espidf-component-leg

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.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 35c685f and 382e730.

📒 Files selected for processing (2)
  • .github/workflows/build_esp32dev_idf5_component.yml
  • ci/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]>
@zackees
zackees merged commit 5ec41c1 into master Jul 22, 2026
13 checks passed
@zackees
zackees deleted the feat/esp32-ci-espidf-component-leg branch July 22, 2026 20:33
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci: bare-IDF (framework=espidf) compile-test legs for IDF 4.4 / 5.x / 6.x (+ FL_NO_ARDUINO ratchet)

1 participant