Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

ci: support the pinned compiler on macOS ARM runners

Rach Pradhand26d399ab854
diff --git a/scripts/install-zig-ci.py b/scripts/install-zig-ci.py
index 4b9a5ecd..2c2ae5e2 100644
--- a/scripts/install-zig-ci.py
+++ b/scripts/install-zig-ci.py
@@ -18,6 +18,12 @@ import zipfile
PINNED_VERSION = "0.17.0-dev.813+2153f8143"
ASSETS = {
+ ("Darwin", "aarch64"): (
+ "zig-aarch64-macos-{version}.tar.xz",
+ "36673d2513afa4a96c86780648ba504beedd7f0451389091cf9d53e38d5b4840",
+ "08abf236d78c05b8520431fbca99903ff98653b2f1cd1c3665a7f8c91247421c",
+ "14a2d724c45db74ba6ef33c5d6c467dde1f6689349009b78d086df426866db09",
+ ),
("Linux", "x86_64"): (
"zig-x86_64-linux-{version}.tar.xz",
"b0d46ffc4587b9e8dd0b524ee5bc4da1e67f28bba55e7c534cec64af2f2d7a74",
@@ -42,6 +48,8 @@ def normalized_arch() -> str:
machine = platform.machine().lower()
if machine in {"x86_64", "amd64"}:
return "x86_64"
+ if machine in {"arm64", "aarch64"}:
+ return "aarch64"
return machine
diff --git a/scripts/test-install-zig-ci.py b/scripts/test-install-zig-ci.py
index 4621db4c..600beb5b 100644
--- a/scripts/test-install-zig-ci.py
+++ b/scripts/test-install-zig-ci.py
@@ -23,6 +23,14 @@ SPEC.loader.exec_module(installer)
class ToolchainIntegrityTests(unittest.TestCase):
+ def test_macos_arm_runner_resolves_a_pinned_archive(self) -> None:
+ for machine in ("arm64", "ARM64", "aarch64"):
+ with self.subTest(machine=machine), mock.patch.object(installer.platform, "machine", return_value=machine):
+ asset = installer.ASSETS[("Darwin", installer.normalized_arch())]
+ self.assertEqual(asset[0], "zig-aarch64-macos-{version}.tar.xz")
+ for checksum in asset[1:]:
+ self.assertRegex(checksum, r"^[0-9a-f]{64}$")
+
def setUp(self) -> None:
self.scratch = tempfile.TemporaryDirectory(prefix="codegraff-installer-test-")
self.root = Path(self.scratch.name) / "toolchain"