Prepare inspected static Metal runtime inventory for macOS staging
This commit is contained in:
1 parent
07bbcb76e8
commit
4a7c4acdcb
11 files changed
+236
-13
No files matched your search
@@ -10,6 +10,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from runtime_provenance import fingerprint, UPSTREAM_COMMIT
|
||||
from macos_runtime import inspect as inspect_macos
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
TAG = "b11461"
|
||||
@@ -215,6 +216,15 @@ def main():
|
||||
os.replace(temporary, directory / "runtime-libraries.json")
|
||||
if linux_dispatch(args.backend):
|
||||
bundle_linux_libraries(build, provenance)
|
||||
if sys.platform == "darwin" and args.backend in {"auto", "metal"}:
|
||||
worker = build / "searchi-gemma-worker"
|
||||
inventory = inspect_macos(worker)
|
||||
with worker.open("rb") as stream:
|
||||
inventory["worker_sha256"] = hashlib.file_digest(stream, "sha256").hexdigest()
|
||||
inventory["build_provenance"] = provenance
|
||||
temporary = build / "runtime-libraries.json.partial"
|
||||
temporary.write_text(json.dumps(inventory, indent=2), encoding="utf-8")
|
||||
os.replace(temporary, build / "runtime-libraries.json")
|
||||
print(f"Runtime build complete: {build}")
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user