diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index 80ec9fccd0..0163a97ebf 100755 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -323,9 +323,26 @@ function getCppAgent(platform, options) { function getZigAgent(platform, options) { const { arch } = platform; - return { - queue: "build-zig", - }; + // Uncomment to restore to using macOS on-prem for Zig. + // return { + // queue: "build-zig", + // }; + + return getEc2Agent( + { + os: "linux", + arch: "x64", + abi: "musl", + distro: "alpine", + release: "3.21", + }, + options, + { + instanceType: "c7i.2xlarge", + cpuCount: 4, + threadsPerCore: 1, + }, + ); } /** diff --git a/cmake/tools/SetupZig.cmake b/cmake/tools/SetupZig.cmake index e14d851a92..fffdce239c 100644 --- a/cmake/tools/SetupZig.cmake +++ b/cmake/tools/SetupZig.cmake @@ -54,7 +54,14 @@ optionx(ZIG_OBJECT_FORMAT "obj|bc" "Output file format for Zig object files" DEF optionx(ZIG_LOCAL_CACHE_DIR FILEPATH "The path to local the zig cache directory" DEFAULT ${CACHE_PATH}/zig/local) optionx(ZIG_GLOBAL_CACHE_DIR FILEPATH "The path to the global zig cache directory" DEFAULT ${CACHE_PATH}/zig/global) -optionx(ZIG_COMPILER_SAFE BOOL "Download a ReleaseSafe build of the Zig compiler. Only availble on macos aarch64." DEFAULT ${BUILDKITE}) + +if(CI AND CMAKE_HOST_APPLE) + set(ZIG_COMPILER_SAFE_DEFAULT ON) +else() + set(ZIG_COMPILER_SAFE_DEFAULT OFF) +endif() + +optionx(ZIG_COMPILER_SAFE BOOL "Download a ReleaseSafe build of the Zig compiler. Only availble on macos aarch64." DEFAULT ${ZIG_COMPILER_SAFE_DEFAULT}) setenv(ZIG_LOCAL_CACHE_DIR ${ZIG_LOCAL_CACHE_DIR}) setenv(ZIG_GLOBAL_CACHE_DIR ${ZIG_GLOBAL_CACHE_DIR})