From 5893ae99c28c79b84ff7af06688e03b9eaccbe20 Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Fri, 8 Aug 2025 16:44:05 -0800 Subject: [PATCH] ci: lower link-bun agent from c7i.16xlarge to r7i.large (#21706) this instance type was reported to be our 1st most expensive per aws bill ---- before: x64-linux: 19.5m arm64-linux: 14m x64-musl: 16.3m arm64-musl: 13.3m x64-windows: 2m after: x64-linux: 20.3m arm64-linux: 15.3m x64-musl: 16m arm64-musl: 13.5m x64-windows: 2.5m --- .buildkite/ci.mjs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index 2c8dccc2e8..7dc0eaa5c8 100755 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -309,6 +309,33 @@ function getCppAgent(platform, options) { }); } +/** + * @param {Platform} platform + * @param {PipelineOptions} options + * @returns {string} + */ +function getLinkBunAgent(platform, options) { + const { os, arch, distro } = platform; + + if (os === "darwin") { + return { + queue: `build-${os}`, + os, + arch, + }; + } + + if (os === "windows") { + return getEc2Agent(platform, options, { + instanceType: arch === "aarch64" ? "r8g.large" : "r7i.large", + }); + } + + return getEc2Agent(platform, options, { + instanceType: arch === "aarch64" ? "r8g.xlarge" : "r7i.xlarge", + }); +} + /** * @returns {Platform} */ @@ -493,7 +520,7 @@ function getLinkBunStep(platform, options) { key: `${getTargetKey(platform)}-build-bun`, label: `${getTargetLabel(platform)} - build-bun`, depends_on: [`${getTargetKey(platform)}-build-cpp`, `${getTargetKey(platform)}-build-zig`], - agents: getCppAgent(platform, options), + agents: getLinkBunAgent(platform, options), retry: getRetry(), cancel_on_build_failing: isMergeQueue(), env: {