Skip to content

perf(ci): use upstream Wild for Linux native test links - #4552

Merged
zackees merged 6 commits into
masterfrom
perf/native-linker-benchmark
Sep 24, 2026
Merged

zackees merged 6 commits into
masterfrom
perf/native-linker-benchmark

Conversation

@zackees

@zackees zackees commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Scope\nUse SHA-verified upstream Wild 0.10.0 for Linux native unit and example links only. Windows and macOS keep their existing linkers. Runtime DLL deployment (the zccache post-link Python hook and --deploy-dependencies) now runs only on Windows, where it is needed; Linux/macOS use runtime search paths. The native linker is part of the build and fingerprint cache identity, so switching linkers safely relinks outputs while retaining objects.\n\n## Measured results\n- Frozen 407-target Linux debug-thin raw-link replay, three interleaved repetitions: LLD 21.1.5 median 16.60s, Wild 0.10.0 11.44s (31.1% less), reld 0.2.0 11.69s. This bypasses zccache and is not a hosted CI claim.\n- Controlled local full runs after disabling Unix deployment, switching linkers while retaining compiled objects: LLD 84.98s; Wild 77.16s (9.2% lower wall time, 12.7% lower reported link phase). Both passed 311 unit tests and 95 examples.\n- With the old Linux deployment hook and LLD, the comparable local run took 442.95s. The post-link Python process on cache-miss links, not linker choice alone, accounts for the dominant local improvement.\n- A prior hosted Wild full unit run before the deployment fix passed all 311 units but took 20m39s total, including 659.62s compilation. The updated Windows-only deployment change still needs fresh hosted validation. Routine PR example workflow runs CompileTests only; the 95-example corpus was covered in the local paired run.\n\n## Verification\n- Focused installer, selection, fingerprint, build/deploy tests: 47 passed and 17 subtests.\n- Full local debug-thin native run: 311/311 units and 95/95 examples passed with both linkers.\n- SHA-verified upstream Wild installer smoke-tested; hosted example job confirms FASTLED_NATIVE_LINKER and --ld-path propagation.\n- bash lint passed; full Python suite running after latest merge.\n- Pre-push review: clean.\n\nRelated: #4529. Reld output-size difference tracked at forge-ci/reld#205.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ca09b4b9-f04c-4d73-80fd-07e6d7e294e3

📥 Commits

Reviewing files that changed from the base of the PR and between 636b0e4 and 1278a19.

📒 Files selected for processing (13)
  • agents/tasks/lessons.md
  • agents/tasks/todo.md
  • ci/early_exit_cache.py
  • ci/meson/build_config.py
  • ci/meson/meson_setup_execute.py
  • ci/meson/meson_setup_phases.py
  • ci/meson/native/meson.build
  • ci/meson/runner_helpers.py
  • ci/tests/test_meson_native_toolchain.py
  • ci/util/fingerprint.py
  • ci/util/test_types.py
  • examples/meson.build
  • tests/meson.build
 ___________________________
< Goodbye, pre-merge panic. >
 ---------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: FastLED/FastLED/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9ba39f9c-9411-4827-8eeb-975508edb3b7

📥 Commits

Reviewing files that changed from the base of the PR and between 2dbe0bc and 636b0e4.

📒 Files selected for processing (19)
  • .github/workflows/template_example_test.yml
  • .github/workflows/template_unit_test.yml
  • agents/tasks/lessons.md
  • agents/tasks/todo.md
  • ci/early_exit_cache.py
  • ci/meson/build_config.py
  • ci/meson/meson_markers.py
  • ci/meson/meson_setup_execute.py
  • ci/meson/meson_setup_phases.py
  • ci/meson/native/meson.build
  • ci/tests/test_install_native_linker.py
  • ci/tests/test_linker_bench.py
  • ci/tests/test_native_linker_fingerprint.py
  • ci/tests/test_native_linker_selection.py
  • ci/tools/install_native_linker.py
  • ci/tools/linker_bench.py
  • ci/util/fingerprint.py
  • ci/util/test_types.py
  • meson.options

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Linux native linker selection using Wild, tracks linker identity in Meson setup and C++ test caches, and adds a tool to benchmark linker candidates by replaying existing native link commands.

Changes

Native linker support

Layer / File(s) Summary
Configure and track the native linker
meson.options, ci/meson/native/meson.build, ci/meson/meson_setup_execute.py, ci/meson/meson_setup_phases.py, ci/meson/meson_markers.py, ci/meson/build_config.py, ci/tests/test_native_linker_selection.py
Meson accepts a native linker path. Build setup resolves and records its identity, reconfigures when the identity changes, and removes stale link outputs after setup. Tests cover selection, migration, and output invalidation.
Include linker identity in test caches
ci/util/test_types.py, ci/util/fingerprint.py, ci/early_exit_cache.py, ci/tests/test_native_linker_fingerprint.py
C++ test and example fingerprints store and compare linker signatures. Early-exit cache paths are disabled when FASTLED_NATIVE_LINKER is set.
Install Wild in Linux CI
ci/tools/install_native_linker.py, ci/tests/test_install_native_linker.py, .github/workflows/template_unit_test.yml, .github/workflows/template_example_test.yml
Adds a pinned Wild 0.10.0 installer with checksum and archive-path validation. The unit and example workflows run it on Linux.
Replay and compare linker candidates
ci/tools/linker_bench.py, ci/tests/test_linker_bench.py, agents/tasks/todo.md, agents/tasks/lessons.md
Adds a Linux tool that replays existing link commands with linker candidates and writes timing and engine data to JSON. Tests cover command rewriting, target selection, run ordering, and result aggregation. Task notes record measurement details and the Linux-only Wild selection.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant CIWorkflow
  participant NativeLinkerInstaller
  participant GITHUB_ENV
  participant BuildConfig
  participant Meson
  participant BuildOutputs
  CIWorkflow->>NativeLinkerInstaller: Run installer on Linux
  NativeLinkerInstaller->>GITHUB_ENV: Write FASTLED_NATIVE_LINKER path
  BuildConfig->>Meson: Configure native_linker option
  Meson-->>BuildConfig: Return setup result
  BuildConfig->>BuildOutputs: Remove stale link outputs when identity changed
Loading

Merge Risk: ⚪ Minimal · up to 636b0

Linux native unit and example CI jobs now link with a checksum-verified upstream Wild 0.10.0 binary. macOS and Windows keep their existing linkers. Changing the linker triggers a relink while compiled objects are kept. No outstanding issues remain, so the change is ready to merge once normal CI checks pass.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 74 functions across 13 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: using upstream Wild for Linux native CI test links. It matches the stated scope and preserves the existing macOS and Windows linker paths.
Full details: Docstring Coverage

Explanation

Docstring coverage is 33.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 74 functions across 13 files. (6 skipped: 6 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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.

@zackees zackees added the ci-full Run the complete release-equivalent CI matrix on this PR SHA label Sep 24, 2026
@zackees zackees removed the ci-full Run the complete release-equivalent CI matrix on this PR SHA label Sep 24, 2026
@zackees zackees changed the title perf(ci): use pinned reld for native unit and example links perf(ci): use upstream Wild for Linux native test links Sep 24, 2026
@zackees
zackees merged commit e1e009f into master Sep 24, 2026
116 of 117 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 24, 2026
zackees added a commit that referenced this pull request Sep 24, 2026
* chore(ci): report observed Actions runner time by commit

* ci: add manual shared native pilot

* perf(ci): live compile gate and nightly example groups (#4545)

* perf(ci): split live compile gate from nightly example sweep

Closes #4544

* ci: run the macOS compile gate on pull requests

* perf(ci): parallelize bounded example gate and report build bytes

* perf(ci): bound Linux compile gate to two jobs

* fix(ci): invalidate example group build configuration cache

* fix(gfx): keep RGBW bind path float-free on soft-float ARM

* fix(ci): grant reusable ATtiny build workflow permissions

* docs(tasks): record example gate and validation results

* ci: cover board-only AutoResearch nightly and stabilize example runner

* fix(ci): remove unused OIDC grants

- Address CodeRabbit comment 4081638666: full sanitizer permission scope.

- Address CodeRabbit comment 4081638678: nightly examples permission scope.

* docs: mark OIDC review feedback addressed

* fix(ci): show manual nightly runs in examples badge (#4547)

* ci: reserve hosted macOS tests for full validation (#4548)

* ci: gate board matrix behind explicit CI labels

Generate board job selection from the fbuild workflow registry, preserve exact PR head checkouts, and validate label transitions. Phase 1 of #4543.

* ci: include emulator and wasm families in selector

Link board labels to companion QEMU, bloat, and AVR8JS checks and make longer-running test families opt-in except on ci-full.

* test: align CI guards with opt-in full board sweep

Keep manual dispatch on the new selector workflow and pin the ESP32-S3 opt-in job to full example coverage.

* ci: validate GitHub label catalog on PRs

Fail the stable selection check when emitted labels are missing from repository metadata.

* ci: keep validator dispatch distinct from full matrix

A manual validation run inventories labels only; it cannot claim the complete board matrix executed.

* ci: run native PR tests on the exact head commit

Pin reusable Linux, Windows, and macOS unit/example checkouts to the tested PR SHA, matching selected board and emulator jobs.

* docs: describe opt-in board CI selection

* ci: run bounded native smoke by default and full suites on label

* docs: compare routine FastLED CI against full sweep

* ci: emit platform-neutral LF smoke targets

* ci: require exact-SHA full evidence before release

* ci: verify exact full CI cells and recheck release head

* test(audio): cover PCM edge case regressions

* test(stl): cover container edge case regressions

* test(ci): cover false-green build checks

* test(stl): construct erase fixtures through public API

* test(stl): detect empty span iterator dereference

* fix(audio): handle PCM analysis edge cases

* fix(stl): harden container edge cases

* fix(ci): reject false-green build checks

* test(audio): respect noise-gate hysteresis sequence

* test(stl): model comparable span iterators

* fix(stl): keep vector allocation failure recoverable

* docs: record issue 4528 validation plan

* fix(stl): preserve empty span pointer identity

* fix(stl): validate span pointer ranges

* chore(stl): satisfy span diagnostics lint

* docs: record issue 4528 final validation

* refactor(audio): move PCM cache reset implementation

* fix(ci): persist only completed fingerprint scopes (#4553)

Keep test-result caches independent, invalidate legacy entries, and guard early exits with source and auxiliary-input validation.

Closes #4550

* perf(ci): use upstream Wild for Linux native test links (#4552)

* perf(ci): select pinned reld for native test links

* docs: record uniform native-linker selection lesson

* perf(ci): scope upstream Wild linker to Linux

* perf(ci): limit runtime dependency deployment to Windows

* fix(ci): fail closed on lint prerequisites and compile deadlines

Closes #4554

* test(ci): isolate native linker override in cache fast-path test (#4556)

* perf(log): keep explicit format macros off stream path (#4559)

Restore the original printf semantics of _F logging macros so single-argument literals avoid constructing an sstream at each call site. Preserve unified stream compatibility on the unsuffixed macros.\n\nCloses #2982

* chore(ci): report observed Actions runner time by commit

* ci: add manual shared native pilot

* revert(ci): remove superseded native pilot

The merged fractional CI implementation now owns native smoke and full-suite routing, so keep this PR focused on the reusable Actions usage collector.

Co-Authored-By: Claude Code <[email protected]>

* fix(ci): make Actions usage metadata unambiguous

Normalize accepted commit SHAs before filtering API results and distinguish latest run status from all-attempt runner time.

Co-Authored-By: Claude Code <[email protected]>

* fix(ci): keep compile deadlines type-safe

Pass bounded integer timeouts to RunningProcess and retain generator cleanup typing so the Python type gate remains green.

Co-Authored-By: Claude Code <[email protected]>

---------

Co-authored-by: Claude Code <[email protected]>
zackees added a commit that referenced this pull request Sep 25, 2026
mp3_cpu_audit, mp3_memory_audit and linux_native ran host-native Meson
(`bash test --cpp`, `bash profile`, `test.py --cpp`) without the
SHA-verified Wild installer the native templates use (#4552), so their
links silently stayed on LLD. Add the same installer step, and a workflow
guard test that fails when a Linux-capable job runs a host-native Meson
step before `ci/tools/install_native_linker.py`. MCU cross-compile and
Python-only steps are out of scope.

Closes #4558

Co-Authored-By: Claude Opus 5.5 <[email protected]>
zackees added a commit that referenced this pull request Sep 25, 2026
…ThinLTO release links (#4558) (#4607)

* perf(ci): select pinned Wild in direct Linux native audit workflows

mp3_cpu_audit, mp3_memory_audit and linux_native ran host-native Meson
(`bash test --cpp`, `bash profile`, `test.py --cpp`) without the
SHA-verified Wild installer the native templates use (#4552), so their
links silently stayed on LLD. Add the same installer step, and a workflow
guard test that fails when a Linux-capable job runs a host-native Meson
step before `ci/tools/install_native_linker.py`. MCU cross-compile and
Python-only steps are out of scope.

Closes #4558

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(ci): keep LLD for ThinLTO release links when Wild is selected

Hosted runs showed the pinned Wild 0.10 cannot link release-mode objects
("contains LLVM-IR, but linker plugin was not supplied"): release uses
-flto=thin. resolve_native_linker now returns LLD for release even when
FASTLED_NATIVE_LINKER is set, the workflow guard exempts
--build-mode release steps, and the all-release MP3 CPU audit drops the
Wild installer it would never use.

Refs #4558

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
pull Bot pushed a commit to manmuqingshan/FastLED that referenced this pull request Sep 25, 2026
…hers

Replace the Linux-only upstream Wild override (FastLED#4552/FastLED#4607) with reld
(zackees/reld v0.2.0) for every host-native link on Linux, macOS and
Windows, in every build mode:

- ci/tools/reld.py provisions the pinned, SHA-256-verified release into
  .cached/reld and resolves the clang-tool-chain linker reld bridges to
  (RELD_BRIDGE_LINKER) for ThinLTO and COFF/Mach-O links.
- resolve_native_linker() always selects reld; FASTLED_NATIVE_LINKER may
  name another reld build only. The ThinLTO exception is gone: reld
  routes LTO links to its bridge (verified: release fft_cq_compare).
- Native build config always links with --ld-path=<reld>; the Linux-only
  guard and the macOS-debug system-linker exception are removed.
- New `bash lint` stage ci/lint/banned_linkers.py fails on any other
  linker selection in ci/, .github/ and build-config files. Board
  (fbuild) and WebAssembly links are out of scope.
- Remove the Wild installer, linker_bench, their tests and workflow
  steps, the system linker apt step, a dead system-linker probe and
  ci/build_example.toml.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@zackees
zackees deleted the perf/native-linker-benchmark branch November 5, 2026 05:53
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.

1 participant