Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix(ci): the macOS release build installs Go for the network gateway (#6422)

ddupont96dd3838ecd3
diff --git a/apps/cua-spaces-macos/scripts/build-release.sh b/apps/cua-spaces-macos/scripts/build-release.sh
index 08d415ec28..aa8dd1f4a1 100755
--- a/apps/cua-spaces-macos/scripts/build-release.sh
+++ b/apps/cua-spaces-macos/scripts/build-release.sh
@@ -148,7 +148,14 @@ if [[ " $archs " == *" arm64 "* ]]; then
microvm_env=(CUA_VZ_BIN="$out/.vz/cua-vz" CUA_MICROVM_INIT_BIN="$init_bin")
fi
-# The network gateway of microVMs (Go, universal; libs/cua/netgw).
+# The network gateway of microVMs (Go, universal; libs/cua/netgw). GitHub's
+# macOS runners do not ship Go: install it with Homebrew when it is missing.
+# Any recent Go will do; netgw/go.mod names the exact toolchain and Go fetches
+# it (checksum-verified by the Go module sum database) on first use.
+if ! command -v go >/dev/null 2>&1; then
+ command -v brew >/dev/null 2>&1 || { echo "Go is missing and so is Homebrew: install Go to build cua-netgw" >&2; exit 1; }
+ brew install go >&2
+fi
"$cua/netgw/build.sh" "$out/.netgw" >/dev/null
microvm_env+=(CUA_NETGW_BIN="$out/.netgw/cua-netgw")