MCPcopy Create free account
hub / github.com/FastLED/FastLED / _build_fbuild

Method _build_fbuild

ci/compiler/pio.py:442–482  ·  view source on GitHub ↗

Build examples using fbuild, preferring ``ci`` when available. compile-many / ``fbuild ci`` are gated behind ``FASTLED_USE_FBUILD_CI`` because today they re-build the framework from scratch in every stage-2 sketch dir (FastLED/fbuild#335). On uno that's a ~7 min run

(self, examples: list[str])

Source from the content-addressed store, hash-verified

440 return futures
441
442 def _build_fbuild(self, examples: list[str]) -> list[Future[SketchResult]]:
443 """Build examples using fbuild, preferring ``ci`` when available.
444
445 compile-many / ``fbuild ci`` are gated behind ``FASTLED_USE_FBUILD_CI``
446 because today they re-build the framework from scratch in every
447 stage-2 sketch dir (FastLED/fbuild#335). On uno that's a ~7 min run
448 vs. ~3.5 min serial; on teensy41/esp32s3 (larger framework) it
449 blows past the 30 min batch timeout — see the runs that landed on
450 master commits d2a025441e / 63e0241808 / fa147ae894. Default off
451 until fbuild#335 ships a shared framework cache; set
452 ``FASTLED_USE_FBUILD_CI=1`` to opt in (e.g. for local timing
453 experiments against the architectural fix once it lands).
454 """
455 import os
456
457 from ci.util.fbuild_runner import (
458 fbuild_supports_ci,
459 fbuild_supports_compile_many,
460 )
461
462 opt_in = os.environ.get("FASTLED_USE_FBUILD_CI", "").lower() in (
463 "1",
464 "true",
465 "yes",
466 "on",
467 )
468 if opt_in:
469 if fbuild_supports_ci():
470 return self._build_fbuild_ci(examples)
471 if fbuild_supports_compile_many():
472 print(
473 "fbuild ci is unavailable in the installed fbuild; "
474 "falling back to fbuild compile-many."
475 )
476 return self._build_fbuild_compile_many(examples)
477 print(
478 "FASTLED_USE_FBUILD_CI=1 was set but fbuild ci/compile-many "
479 "are unavailable in the installed fbuild; falling back to "
480 "the legacy serial loop."
481 )
482 return self._build_fbuild_sync(examples)
483
484 def _compile_many_project_dir(self, example: str, index: int) -> Path:
485 """Return the staged project directory for one compile-many sketch."""

Callers 1

buildMethod · 0.95

Calls 7

_build_fbuild_ciMethod · 0.95
_build_fbuild_syncMethod · 0.95
fbuild_supports_ciFunction · 0.90
printFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected