Skip to content

Commit

Permalink
Fix parallelism for check and compile command on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed Mar 28, 2024
1 parent 0d9a4a6 commit fdad84e
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 fdad84e

Please sign in to comment.