Check if libfastled.a is up-to-date based on source fingerprint.
(build_dir: Path)
| 379 | |
| 380 | |
| 381 | def _library_is_fresh(build_dir: Path) -> bool: |
| 382 | """Check if libfastled.a is up-to-date based on source fingerprint.""" |
| 383 | library_archive = build_dir / "ci" / "meson" / "wasm" / "libfastled.a" |
| 384 | fingerprint_file = build_dir / "library_src_fingerprint" |
| 385 | |
| 386 | if not library_archive.exists() or not fingerprint_file.exists(): |
| 387 | return False |
| 388 | |
| 389 | try: |
| 390 | stored = fingerprint_file.read_text(encoding="utf-8").strip() |
| 391 | current = _compute_src_fingerprint() |
| 392 | return stored == current |
| 393 | except OSError: |
| 394 | return False |
| 395 | |
| 396 | |
| 397 | def _save_library_fingerprint(build_dir: Path) -> None: |
no test coverage detected