Skip to content

Commit

Permalink
Distribute bundles more evenly into CI shards
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Feb 20, 2023
1 parent bb1e3d0 commit d45de14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/rollup/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,6 @@ function resolveEntryFork(resolvedEntry, isFBBundle) {
}

async function createBundle(bundle, bundleType) {
if (shouldSkipBundle(bundle, bundleType)) {
return;
}

const filename = getFilename(bundle, bundleType);
const logKey =
chalk.white.bold(filename) + chalk.dim(` (${bundleType.toLowerCase()})`);
Expand Down Expand Up @@ -766,6 +762,10 @@ async function buildEverything() {
);
}

bundles = bundles.filter(([bundle, bundleType]) => {
return !shouldSkipBundle(bundle, bundleType);
});

if (process.env.CIRCLE_NODE_TOTAL) {
// In CI, parallelize bundles across multiple tasks.
const nodeTotal = parseInt(process.env.CIRCLE_NODE_TOTAL, 10);
Expand Down

0 comments on commit d45de14

Please sign in to comment.