Ensure libfastled.a is up-to-date by calling wasm_build_library.py. Args: build_mode: Build mode to pass to library build verbose: Enable verbose output force: Force rebuild of library unity_chunks: Number of unity build chunks (0 = disabled) Returns:
(
build_mode: str,
verbose: bool = False,
force: bool = False,
unity_chunks: int = 0,
)
| 38 | |
| 39 | |
| 40 | def ensure_library_built( |
| 41 | build_mode: str, |
| 42 | verbose: bool = False, |
| 43 | force: bool = False, |
| 44 | unity_chunks: int = 0, |
| 45 | ) -> bool: |
| 46 | """ |
| 47 | Ensure libfastled.a is up-to-date by calling wasm_build_library.py. |
| 48 | |
| 49 | Args: |
| 50 | build_mode: Build mode to pass to library build |
| 51 | verbose: Enable verbose output |
| 52 | force: Force rebuild of library |
| 53 | unity_chunks: Number of unity build chunks (0 = disabled) |
| 54 | |
| 55 | Returns: |
| 56 | True if successful |
| 57 | """ |
| 58 | print("Checking library build...") |
| 59 | cmd = [ |
| 60 | "uv", |
| 61 | "run", |
| 62 | "python", |
| 63 | str(PROJECT_ROOT / "ci" / "wasm_build_library.py"), |
| 64 | "--mode", |
| 65 | build_mode, |
| 66 | ] |
| 67 | if verbose: |
| 68 | cmd.append("--verbose") |
| 69 | if force: |
| 70 | cmd.append("--force") |
| 71 | if unity_chunks > 0: |
| 72 | cmd.extend(["--unity-chunks", str(unity_chunks)]) |
| 73 | |
| 74 | result = subprocess.run(cmd, cwd=PROJECT_ROOT) |
| 75 | return result.returncode == 0 |
| 76 | |
| 77 | |
| 78 | def create_wrapper_for_example(example_name: str, output_path: Path) -> Path: |
no test coverage detected