From a4556c9877255f922d767a9e54b20c53d658df59 Mon Sep 17 00:00:00 2001 From: Ashcon Partovi Date: Wed, 13 Nov 2024 21:47:00 -0800 Subject: [PATCH] Changes [build image] --- .buildkite/ci.mjs | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/.buildkite/ci.mjs b/.buildkite/ci.mjs index 450e41eebf66bb..8abc367e90029f 100644 --- a/.buildkite/ci.mjs +++ b/.buildkite/ci.mjs @@ -339,14 +339,9 @@ function getPipeline(options) { * @returns {Step} */ const getBuildVendorStep = target => { - let depends_on; - if (buildImages) { - depends_on = [`${getTargetKey(target)}-build-image`]; - } return { key: `${getTargetKey(target)}-build-vendor`, label: `${getTargetLabel(target)} - build-vendor`, - depends_on, agents: getBuildAgent(target), retry: getRetry(), cancel_on_build_failing: isMergeQueue(), @@ -360,14 +355,9 @@ function getPipeline(options) { * @returns {Step} */ const getBuildCppStep = target => { - let depends_on; - if (buildImages) { - depends_on = [`${getTargetKey(target)}-build-image`]; - } return { key: `${getTargetKey(target)}-build-cpp`, label: `${getTargetLabel(target)} - build-cpp`, - depends_on, agents: getBuildAgent(target), retry: getRetry(), cancel_on_build_failing: isMergeQueue(), @@ -385,10 +375,6 @@ function getPipeline(options) { */ const getBuildZigStep = target => { const toolchain = getBuildToolchain(target); - let depends_on; - if (buildImages) { - depends_on = [`${getTargetKey(target)}-build-image`]; - } return { key: `${getTargetKey(target)}-build-zig`, label: `${getTargetLabel(target)} - build-zig`, @@ -513,12 +499,18 @@ function getPipeline(options) { } if (buildImages || !buildId) { - steps.push( - getBuildVendorStep(platform), - getBuildCppStep(platform), - getBuildZigStep(platform), - getBuildBunStep(platform), - ); + const buildSteps = [getBuildVendorStep(platform), getBuildCppStep(platform), getBuildZigStep(platform)]; + if (buildImages) { + steps.push( + ...buildSteps.map(step => ({ + ...step, + depends_on: [`${getPlatformKey(platform)}-build-image`], + })), + ); + } else { + steps.push(...buildSteps); + } + steps.push(getBuildBunStep(platform)); } for (const platform of tests) {