Skip to content

Commit

Permalink
Changes [build image]
Browse files Browse the repository at this point in the history
  • Loading branch information
Electroid committed Nov 13, 2024
1 parent 9592ff3 commit 8879b40
Showing 1 changed file with 31 additions and 20 deletions.
51 changes: 31 additions & 20 deletions .buildkite/ci.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -330,45 +330,56 @@ function getPipeline(options) {
* Config
*/

const buildPlatforms = [
const targets = [
{ os: "linux", arch: "aarch64", abi: "musl" },
{ os: "linux", arch: "x64", abi: "musl" },
];

const buildPlatforms = [
{ os: "linux", arch: "aarch64", abi: "musl", distro: "alpine", release: "3.17" },
{ os: "linux", arch: "x64", abi: "musl", distro: "alpine", release: "3.17" },
];

const testPlatforms = [
...buildPlatforms,
{ os: "linux", arch: "aarch64", abi: "musl", distro: "alpine", release: "3.20" },
{ os: "linux", arch: "aarch64", abi: "musl", distro: "alpine", release: "3.17" },
{ os: "linux", arch: "x64", abi: "musl", distro: "alpine", release: "3.20" },
{ os: "linux", arch: "x64", abi: "musl", distro: "alpine", release: "3.17" },
];

return {
priority: getPriority(),
steps: [
...buildPlatforms.map(platform => {
const { os, arch, abi, baseline } = platform;
const platforms = testPlatforms.filter(
platform =>
platform.os === os && platform.arch === arch && abi === platform.abi && baseline === platform.baseline,
);
...targets.map(target => {
const { os, arch, abi, baseline } = target;
const isTarget = entry =>
entry.os === os && entry.arch === arch && abi === entry.abi && baseline === entry.baseline;
const builds = buildPlatforms.filter(isTarget);
const tests = testPlatforms.filter(isTarget);

let steps = [];

if (buildImages) {
steps.push(...platforms.map(platform => getBuildImageStep(platform)));
} else {
steps.push(...platforms.map(platform => getTestBunStep(platform)));
}

if (!buildId && !buildImages) {
steps.unshift(
getBuildVendorStep(platform),
getBuildCppStep(platform),
getBuildZigStep(platform),
getBuildBunStep(platform),
const images = Array.from(
new Map([...builds, ...tests].map(platform => [JSON.stringify(platform), platform])).values(),
);
steps.push(...images.map(platform => getBuildImageStep(platform)));
}

// if (buildImages) {
// steps.push(...builds.map(platform => getBuildImageStep(platform)));
// } else {
// steps.push(...platforms.map(platform => getTestBunStep(platform)));
// }

// if (!buildId && !buildImages) {
// steps.unshift(
// getBuildVendorStep(platform),
// getBuildCppStep(platform),
// getBuildZigStep(platform),
// getBuildBunStep(platform),
// );
// }

return {
key: getKey(platform),
group: getLabel(platform),
Expand Down

0 comments on commit 8879b40

Please sign in to comment.