Skip to content

ci(size): pin binary-size checks to --backend platformio (unblock master) - #2605

Merged
zackees merged 1 commit into
masterfrom
fix/ci-size-checks-pin-pio
May 30, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/ci-size-checks-pin-pio

Conversation

@zackees

@zackees zackees commented May 30, 2026 •

Copy link
Copy Markdown
Member

Summary

All 9 binary-size workflows have been red on master for ~5 weeks. Root cause is two fbuild deficiencies, both now filed upstream:

  • FastLED/fbuild#297 - fbuild does not emit build_info_<example>.json, so ci/compiled_size.py cannot find it (the visible "build_info.json not found" CI error).
  • FastLED/fbuild#304 - fbuild links framework .o files directly instead of archiving them, so unused ISR symbols (e.g. Tone.cpp on attiny85) get pulled in, inflating Blink by +10.1% (342 bytes). Even after Typos #297 lands, the budget is already exceeded.

Both fixes are real work on the fbuild Rust crates. While they land, this PR threads --backend platformio through the three uv run ci/ci-check-compiled-size.py invocations in build_template_binary_size.yml. PlatformIO already emits build_info_<example>.json and already archives framework objects, so both deficiencies are sidestepped.

Affected workflows that should go green again:
attiny85_binary_size, check_uno_size, check_teensy30/31/32/35/36/41/LC_size, check_bluepill_size.

Revert plan

When fbuild ships fixes for #297 and #304, delete the three --backend platformio tokens added by this PR.

Test plan

  • CI: attiny85_binary_size turns green
  • CI: check_uno_size turns green
  • CI: at least one check_teensy*_size turns green
  • CI: check_bluepill_size turns green

Companion meta-issue: filed against fbuild as a debuggability ask is FastLED/fbuild#305 (would have caught this regression ~5 weeks earlier).

Summary by CodeRabbit

  • Chores
    • Updated internal CI/CD workflow configuration for binary size validation steps.

Review Change Stack

…ter)

All 9 binary-size workflows have been red on master since #2521
(`ci: make fbuild the default for board builds`). fbuild has two
deficiencies that compound here:

  - FastLED/fbuild#297 - fbuild does not emit build_info_<example>.json,
    so ci/compiled_size.py can never find it (the visible CI error).
  - FastLED/fbuild#304 - fbuild links framework .o files directly
    instead of archiving them, so unused ISR symbols (Tone.cpp on
    attiny85) get pulled in, inflating Blink by +10.1% (342 bytes).
    Even after #297 lands, the budget is already exceeded.

Both bugs are filed against fbuild. While they land, force
ci-check-compiled-size.py to use the platformio backend by
threading --backend platformio through to the inner ci.ci-compile
call. This restores green to attiny85_binary_size and the seven
check_teensy*_size + check_bluepill_size + check_uno_size workflows
with a single ~6-line YAML diff.

To revert once fbuild ships fixes: delete the three "--backend
platformio" tokens in build_template_binary_size.yml.
@coderabbitai

coderabbitai Bot commented May 30, 2026 •

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8fd681e2-f794-4c34-b40a-6235d6af09f3

📥 Commits

Reviewing files that changed from the base of the PR and between cb7b51c and 40b75f2.

📒 Files selected for processing (1)
  • .github/workflows/build_template_binary_size.yml

📝 Walkthrough

Walkthrough

The workflow template for binary size checks is updated to explicitly invoke the size-check script with --backend platformio across three program size validation steps: the Blink board check, the Apa102 example check, and the Apa102 check with the FASTLED_HD_COLOR_MIXING=1 flag.

Changes

Binary Size Check Workflow

Layer / File(s) Summary
Add --backend platformio to size-check invocations
.github/workflows/build_template_binary_size.yml
Three uv run ci/ci-check-compiled-size.py invocations receive an explicit --backend platformio argument for Blink, Apa102, and Apa102 with FASTLED_HD_COLOR_MIXING=1 size checks.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

Poem

🐰 A workflow tweak, so small yet bright,
Three invocations set just right—
With PlatformIO flag now in place,
Binary sizes check at proper pace! 📦✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-size-checks-pin-pio

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 and usage tips.

@zackees
zackees merged commit 54ce09d into master May 30, 2026
1 check failed
@zackees
zackees deleted the fix/ci-size-checks-pin-pio branch May 30, 2026 20:02
zackees added a commit that referenced this pull request Jun 5, 2026
…loses #2608) (#2790)

The check_esp32_size workflow has been red on master with
`esp32dev size 635768 is greater than max size 330000` since at least
2026-05-30 (100% failure rate across 30+ runs).

Per #2608 option A, bump both max_size and max_size_apa102 from 330000
to 700000 (~10% headroom over the observed 635 KB) so master goes green
again. The 330 KB ceiling pre-dates the Channel API (~70 KB), pinning
the size check to the platformio backend in #2605 (lost the ~169 KB
eh_frame strip from fbuild), and subsequent Arduino-ESP32 framework
growth.

Follow-up tracked in #2608: once fbuild ships #297 (build_info.json)
and #304 (framework .o archiving) so #2605 can be reverted, file a
new issue to recalibrate this budget downward to the fbuild-backend
size.

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
pull Bot pushed a commit to manmuqingshan/FastLED that referenced this pull request Jun 5, 2026
…astLED#2773)

The esp32dev_binary_size workflow had been pinned to --backend platformio
(PR FastLED#2605) and the budget bumped 330000 -> 700000 (PR FastLED#2790) to dodge two
fbuild deficiencies — fbuild#297 (no build_info.json emitter) and
fbuild#304 (framework objects not archived). Both upstream issues are
fixed in fbuild 2.2.10+ (we pin 2.2.17), so restore both:

- build_template_binary_size.yml: drop the three --backend platformio
  flags so ci.ci-compile defaults to fbuild and we get .eh_frame stripping
  back on every size workflow (~169KB on esp32dev).
- check_esp32_size.yml: revert max_size/max_size_apa102 to the historical
  330000 high-water mark. The test will fail at this ceiling — that is
  the regression signal the user asked for ("minimal memory size... goal
  is complete when the esp size test is failing again with its historical
  high water mark").

Also fix a master-blocking compile error introduced by FastLED#2795: the new
enum class DriverStatus { DISABLED, ENABLED } in fl/channels/manager.h
is textually rewritten by Arduino-ESP32's `#define DISABLED 0x00`
(esp32-hal-gpio.h:59) at every site that includes Arduino.h before
manager.h — which is every esp32 sketch. The platformio-backend CI is
failing for the same reason (`esp32dev_binary_size` red on every push).
Rename to STATUS_DISABLED/STATUS_ENABLED and update the four callers in
channel.cpp.hpp, manager.cpp.hpp, and tests/fl/channels/channel.cpp.

Local verification: fbuild build of examples/Blink on esp32dev succeeds,
emits build_info_Blink.json (with tool aliases the symbol_analysis
pipeline needs), and ci-check-compiled-size.py reports
"esp32dev size 640228 is greater than max size 330000" — the expected
regression signal.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
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.

1 participant