Repository navigation
Closed
Description
Context
The Linux, macOS, and Windows example workflows currently run Blink and then all native host examples on PRs (template_example_test.yml). Meson discovers 114 .ino sketches recursively and creates a separate shared-library/test target for each host-compatible example (examples/meson.build); there is no category manifest. A recent Linux example job took 4m43s: roughly 3m cold Blink build and 52s for the all-examples step. Merely partitioning the latter cannot remove the dominant cold-build cost. The existing Linux examples badge in README.md points at example_test_linux.yml.
Proposal
- Define explicit, path-based membership for six exhaustive nightly groups: Basic, Classic, Advanced, Fx, Experimental, AutoResearch. Validate that every discovered sketch belongs to exactly one group, with no duplicates or silent omissions. Preserve existing
@filterplatform rules and the independent boardSMOKE_SKETCHES.txtcontract; do not move user-facing sketch paths to create categories. - Define a seventh, deliberately cross-cutting Compile Tests gate for live PRs. Make it highly amalgamated: one or a small bounded number of native translation units should exercise representative FastLED public APIs and sketch-level compile contracts, with a single build/run path rather than a separate DLL and link for every example. Do not naively concatenate arbitrary
.inofiles: their globalsetup/loop, macros, and declarations can collide. Include a focused path for a PR that changes the compile gate itself. Keep core-only ASan/UBSan (debug-thin) on Linux and equivalent existing sanitizer intent on other hosts. - Change live Linux/macOS/Windows example workflows to run the Compile Tests gate rather than the six full categories. Add a
nightly-examplesworkflow on Linux, scheduled every night and manually dispatchable, that exercises all six groups and fails if any sketch in an enabled group fails. Repoint the existing Linux examples badge to the nightly workflow, so its status reports the full sweep, not the reduced live gate. Make the badge label and workflow names accurately distinguish live compile tests from nightly examples. - Investigate and implement at least one additional measured speedup beyond grouping. Profile install, Meson setup/core build, PCH, compile/link, runner copies, and execution separately. Prioritize eliminating redundant cold Blink work, unnecessary reconfigure/clean, and safe reuse of cache/build artifacts; assess parallelism against runner memory and retain a no-PCH or equivalent regression check only if it is genuinely effective. Avoid disabling fingerprinting or zccache.
- Publish comparable before/after GitHub Actions timings and artifact size for the live example gate. Preserve the full nightly coverage and document the intentional PR-vs-nightly coverage gap.
Acceptance criteria
- RED: Record the current live workflow wall/step times on representative Linux runs; add focused failing tests proving category coverage/uniqueness, compile-gate selection, workflow routing, and badge target before changing behavior.
- GREEN: Every discovered sketch is assigned exactly once to Basic, Classic, Advanced, Fx, Experimental, or AutoResearch, and the nightly run actually builds/runs each host-compatible member while reporting skips from existing platform filters. Membership changes and new sketches invalidate the right configuration/cache.
- GREEN: The PR example gate builds and executes the amalgamated Compile Tests target on Linux/macOS/Windows; a failure in any included compile contract fails CI. A targeted test shows representative API breakage fails the live gate. Existing unit, board-smoke, and platform workflows continue to resolve their sketches.
- GREEN: The
nightly-examplesworkflow runs all six groups on schedule and dispatch, and the existing Linux examples badge points to it. A workflow-level regression test covers live versus nightly selection, and the badge URL is verified after the workflow exists on the default branch. - GREEN: At least one non-partition speedup is implemented and its effect is measured. Report cold and warm step timings from comparable runners, including setup/core, compile/link, execution, wall time, and build bytes. Aim for at least 25% live example-job wall-time reduction; if below that, explain the limit and do not claim the speed objective complete without another improvement.
- Run repository lint, focused tests, and the relevant live and nightly workflows before closing. Keep the full nightly signal visible even when PRs become faster.
Decisions
- Orchestration: The primary agent owns this issue, design integration, review, CI validation, and landing. Disjoint implementation/research slices go to Sol low-effort subagents; shared build and workflow decisions remain serial with the orchestrator.
- Logical groups, no directory moves: preserving user-facing example paths and board references avoids a large migration; explicit path-based membership is auditable.
- Compile Tests is an overlay, not a seventh slice of the 114 sketches: the six nightly groups remain exhaustive, while the live gate intentionally repeats only representative compile contracts. This avoids misleadingly removing AutoResearch or Fx sketches from their nightly category.
- Nightly Linux first: the existing Linux examples badge becomes the full-sweep signal; macOS/Windows retain live compile coverage. Their reduced full-example breadth is an explicit coverage tradeoff, not an accidental omission.
- Keep sanitizer/fingerprint policy: speed must come from less redundant work or safe reuse, not silently weakening the recently added core sanitizer preset or disabling the repository cache.
Related issues
- perf(ci): investigate 20-minute Linux unit job, cold_skip misses, and example runtime #4529 tracks the broader CI performance investigation, including example runtime; this issue owns the specific live/nightly example split and measured implementation.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsDone
Activity
zackees commentedon Sep 23, 2026
Implementation is in PR #4545. Hosted Linux live gate: 4m43s baseline (run 35839651828) -> 3m16s with bounded two-job compilation (run 35845153968), a 31% reduction. The live CompileTests step took 2m22s, its Linux build directory was 80,944,978 bytes, and zccache was cold (0/30 hits). Serial compilation measured 4m06s; unrestricted parallelism regressed to 5m09s, so the two-job limit is evidence-based. Local Nightly selection ran all 95 host-compatible examples successfully; the six-group manifest covers all 114 sketches, with 19 filtered by existing host rules. All 310 native unit tests, lint, and focused Python tests passed. The macOS and Windows compile steps also passed, though the latest macOS workflow was marked cancelled after its successful steps and is being rerun for a clean overall status. I did not add another Actions artifact cache: repository cache usage is already 18,591,220,705 bytes (GitHub cache usage API), with several 1.1-1.4 GB platform caches. Another broad cache could evict existing unit/platform entries; any future zccache persistence should be a small, isolated, measured trial after cache-budget review.
zackees commentedon Sep 23, 2026
Follow-up: the macOS CompileTests workflow rerun completed successfully (run 35845154239, attempt 2); Linux and Windows live gates are also green. PR #4545 remains open because ten other checks on the same PR were cancelled without test failures. The new nightly workflow cannot be dispatched until its file reaches the default branch; the local Nightly sweep passed 95/95 host-compatible sketches.
zackees commentedon Sep 23, 2026
Hosted Linux live-gate comparison for PR #4545 (same example workflow, GitHub-hosted Ubuntu):
The latest run alone is 24% faster; setup/cache variability explains why it falls just short of the 25% target, while the four-run median exceeds it. The baseline has no build-size instrumentation, so I cannot claim a measured byte reduction. The live gate still compiles/runs the amalgamated contract under Linux debug-thin ASan/UBSan; 95 host-compatible examples move to the nightly job, and board-only AutoResearch has a separate nightly ESP32-S3 job. Local clean Nightly passed 95/95. Hosted nightly validation remains pending until the workflow lands on default branch.
zackees commentedon Sep 23, 2026
Hosted default-branch validation: the manually dispatched nightly workflow passed both jobs: https://github.com/FastLED/FastLED/actions/runs/35910439622. The Linux host sweep passed 95/95 examples with 163,854,267 build-directory bytes, and the ESP32-S3 AutoResearch sketch compiled successfully. The schedule is configured for 03:20 America/Los_Angeles; the first cron-triggered run has not occurred yet. The schedule-filtered badge still shows no status for this successful manual run, so follow-up PR #4547 removes that filter; the unfiltered badge already reports passing.
zackees commentedon Sep 23, 2026
Final verification: badge follow-up #4547 is merged. The README on master now uses the unfiltered nightly-workflow badge, which reports passing for the successful manual full-sweep run. One non-blocking telemetry limitation remains: the AutoResearch board job compiles successfully, but a size-report step looks for Blink build metadata and logs an error; it does not change the job result or example compile coverage.
zackees commentedon Sep 23, 2026
Timing audit for comparable GitHub-hosted Linux example jobs: baseline run 35839651828 was 4m43s wall, with Install 27s, cold Blink 3m00s, and full examples 52s (zccache 0/32 hits). Recent live run 35850441309 was 3m36s wall, with Install 50s and CompileTests 2m15s (zccache 0/30 hits). Within the latter compile step, Meson setup took about 1.7s, Ninja object completion spanned about 122s from first to last object, core linking about 8s, and the executable test 0.02s; build directory was 80,946,132 bytes. All four hosted post-change runs had zero zccache hits, so they are cold-cache observations, not a hosted warm-cache comparison. Local cold build/run was 92s and warm reruns 4-11s. The baseline workflow did not log build bytes, so a before/after byte reduction cannot be claimed.
perf(ci): live compile gate and nightly example groups (FastLED#4545)
chore(ci): measure observed Actions runner time across workflows (#4546)