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

Function ensure_unity_files_generated

ci/wasm_build_library.py:353–389  ·  view source on GitHub ↗

Ensure unity build files are generated and up-to-date. Args: unity_chunks: Number of unity chunks to generate verbose: Enable verbose output Returns: Exit code (0 = success)

(unity_chunks: int, verbose: bool = False)

Source from the content-addressed store, hash-verified

351
352
353def ensure_unity_files_generated(unity_chunks: int, verbose: bool = False) -> int:
354 """
355 Ensure unity build files are generated and up-to-date.
356
357 Args:
358 unity_chunks: Number of unity chunks to generate
359 verbose: Enable verbose output
360
361 Returns:
362 Exit code (0 = success)
363 """
364 if unity_chunks <= 0:
365 return 0 # Unity builds disabled
366
367 print(f"Generating unity build files ({unity_chunks} chunks)...")
368
369 cmd = [
370 "uv",
371 "run",
372 "python",
373 str(PROJECT_ROOT / "ci" / "wasm_unity_generator.py"),
374 "--chunks",
375 str(unity_chunks),
376 "--output",
377 str(UNITY_DIR),
378 ]
379
380 if verbose:
381 cmd.append("--verbose")
382
383 result = subprocess.run(cmd, cwd=PROJECT_ROOT)
384
385 if result.returncode != 0:
386 print(f"✗ Unity file generation failed with return code {result.returncode}")
387 return result.returncode
388
389 return 0
390
391
392def create_thin_archive(

Callers 1

build_libraryFunction · 0.85

Calls 3

printFunction · 0.50
appendMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected