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
This commit is contained in:
Meghan Denny
2025-08-08 16:44:05 -08:00
committed by GitHub
parent 0c46791d28
commit 5893ae99c2

View File

@@ -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: {