Skip to content

Commit

Permalink
Merge pull request #26678 from storybookjs/valentin/fix-ci-3
Browse files Browse the repository at this point in the history
CI: Fix parallelism for check and compile command on CI
  • Loading branch information
valentinpalkovic authored Mar 28, 2024
2 parents 0d9a4a6 + fdad84e commit 663194c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/tasks/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import type { Task } from '../task';
import { exec } from '../utils/exec';
import { maxConcurrentTasks } from '../utils/maxConcurrentTasks';

const parallel = `--parallel=${process.env.CI ? 8 : maxConcurrentTasks}`;
// The amount of VCPUs for the check task on CI is 8 (xlarge resource)
const amountOfVCPUs = 8;

const parallel = `--parallel=${process.env.CI ? amountOfVCPUs - 1 : maxConcurrentTasks}`;

const linkCommand = `nx affected -t check ${parallel}`;
const nolinkCommand = `nx affected -t check -c production ${parallel}`;
Expand Down
5 changes: 4 additions & 1 deletion scripts/tasks/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { maxConcurrentTasks } from '../utils/maxConcurrentTasks';
import { exec } from '../utils/exec';
import type { Task } from '../task';

const parallel = `--parallel=${process.env.CI ? 8 : maxConcurrentTasks}`;
// The amount of VCPUs for the check task on CI is 4 (large resource)
const amountOfVCPUs = 4;

const parallel = `--parallel=${process.env.CI ? amountOfVCPUs - 1 : maxConcurrentTasks}`;

const linkedContents = `export * from '../src/index';`;
const linkCommand = `nx run-many -t build ${parallel}`;
Expand Down

0 comments on commit 663194c

Please sign in to comment.