diff --git a/scripts/tasks/check.ts b/scripts/tasks/check.ts index 9e8d9ce0186..30b9f5ab95a 100644 --- a/scripts/tasks/check.ts +++ b/scripts/tasks/check.ts @@ -2,7 +2,10 @@ import type { Task } from '../task'; import { exec } from '../utils/exec'; import { maxConcurrentTasks } from '../utils/maxConcurrentTasks'; -const 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 run-many --target="check" --all --parallel=${parallel} --exclude=@storybook/vue,@storybook/svelte,@storybook/vue3,@storybook/angular`; const nolinkCommand = `nx run-many --target="check" --all --parallel=${parallel}`; diff --git a/scripts/tasks/compile.ts b/scripts/tasks/compile.ts index 1d6c2678ce1..cfffa1853b5 100644 --- a/scripts/tasks/compile.ts +++ b/scripts/tasks/compile.ts @@ -5,10 +5,15 @@ import { maxConcurrentTasks } from '../utils/maxConcurrentTasks'; import { exec } from '../utils/exec'; import type { Task } from '../task'; +// 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 --target="prep" --all --parallel --max-parallel=${maxConcurrentTasks} -- --reset`; +const linkCommand = `nx run-many --target="prep" --all --parallel --max-parallel=${parallel} -- --reset`; const noLinkCommand = `nx run-many --target="prep" --all --parallel=8 ${ - process.env.CI ? `--max-parallel=${maxConcurrentTasks}` : '' + process.env.CI ? `--max-parallel=${parallel}` : '' } -- --reset --optimized`; export const compile: Task = {