fix: generate showcase thumbnails deterministically
Some checks failed
ci / test (macos-latest, 3.10) (push) Has been cancelled
ci / test (macos-latest, 3.12) (push) Has been cancelled
ci / test (ubuntu-latest, 3.10) (push) Has been cancelled
ci / test (ubuntu-latest, 3.12) (push) Has been cancelled
ci / test (windows-latest, 3.10) (push) Has been cancelled
ci / test (windows-latest, 3.12) (push) Has been cancelled
ci / browser-smoke (push) Has been cancelled

This commit is contained in:
2026-07-21 14:53:23 +08:00
parent e0cd974c6b
commit 8cc64f2e58
3 changed files with 26 additions and 3 deletions

View File

@@ -373,7 +373,7 @@ def ensure_node_runtime(pipeline: Pipeline, *, browser: bool) -> None:
)
def run_browser_smoke(pipeline: Pipeline, web_dir: Path, report: Path, screenshots: Path) -> None:
def run_browser_smoke(pipeline: Pipeline, web_dir: Path, report: Path, screenshots: Path, thumbnail: Path) -> None:
"""Serve the formal Web bundle and mechanically prove desktop/mobile loading."""
report.parent.mkdir(parents=True, exist_ok=True)
port = available_port()
@@ -405,8 +405,10 @@ def run_browser_smoke(pipeline: Pipeline, web_dir: Path, report: Path, screensho
str(report),
"--screenshots-dir",
str(screenshots),
"--thumbnail-out",
str(thumbnail),
),
[report, screenshots],
[report, screenshots, thumbnail],
)
finally:
server.terminate()
@@ -695,7 +697,13 @@ def run_pipeline(args: argparse.Namespace) -> int:
browser_report = (
Path(args.browser_report).resolve() if args.browser_report else out_dir / "browser_smoke_report.json"
)
run_browser_smoke(pipeline, web_dir, browser_report, out_dir / "browser_smoke")
run_browser_smoke(
pipeline,
web_dir,
browser_report,
out_dir / "browser_smoke",
out_dir / "thumbnail.png",
)
standard = bundle / "variants" / "standard" / "standard.glb"
offline = out_dir / "viewer.html"