Skip to content

Commit

Permalink
Set rush parallelism to "max" (# of cores) (#6462)
Browse files Browse the repository at this point in the history
- Default on Windows is "cores - 1" (microsoft/rushstack#436)
- Increasing to "max" ensures parallelism is set to the number of cores on all platforms
- Significantly improves Windows build times
  • Loading branch information
mikeharder committed Dec 7, 2019
1 parent 670e4b7 commit 64bf0b4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
16 changes: 12 additions & 4 deletions eng/pipelines/templates/jobs/archetype-sdk-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ jobs:
BuildSHA: $(Build.SourceVersion)
RepoId: "Azure/azure-sdk-for-js"

# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node eng/tools/rush-runner.js build "${{parameters.ServiceDirectory}}" --verbose
node eng/tools/rush-runner.js build "${{parameters.ServiceDirectory}}" --verbose -p max
displayName: "Build libraries"
- script: |
Expand Down Expand Up @@ -233,16 +235,22 @@ jobs:
node common/scripts/install-run-rush.js install
displayName: "Install dependencies"
# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node eng/tools/rush-runner.js build --verbose
node eng/tools/rush-runner.js build --verbose -p max
displayName: "Build libraries"
# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node eng/tools/rush-runner.js build:test --verbose
node eng/tools/rush-runner.js build:test --verbose -p max
displayName: "Build test assets"
# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node eng/tools/rush-runner.js unit-test "${{parameters.ServiceDirectory}}" --verbose
node eng/tools/rush-runner.js unit-test "${{parameters.ServiceDirectory}}" --verbose -p max
displayName: "Test libraries"
# Unlink node_modules folders to significantly improve performance of subsequent tasks
Expand Down
12 changes: 9 additions & 3 deletions eng/pipelines/templates/jobs/archetype-sdk-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,25 @@ jobs:
node common/scripts/install-run-rush.js install
displayName: "Install dependencies"
# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node common/scripts/install-run-rush.js build -t "${{parameters.PackageName}}" --verbose
node common/scripts/install-run-rush.js build -t "${{parameters.PackageName}}" --verbose -p max
displayName: "Build libraries"
# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node common/scripts/install-run-rush.js build:test -t "${{parameters.PackageName}}" --verbose
node common/scripts/install-run-rush.js build:test -t "${{parameters.PackageName}}" --verbose -p max
displayName: "Build test assets"
- ${{if ne(parameters.PreIntegrationSteps, '')}}:
- template: ../steps/${{parameters.PreIntegrationSteps}}.yml

# Option "-p max" ensures parallelism is set to the number of cores on all platforms, which improves build times.
# The default on Windows is "cores - 1" (microsoft/rushstack#436).
- script: |
node common/scripts/install-run-rush.js integration-test:$(TestType) -t "${{parameters.PackageName}}" --verbose
node common/scripts/install-run-rush.js integration-test:$(TestType) -t "${{parameters.PackageName}}" --verbose -p max
displayName: "Integration test libraries"
env: ${{parameters.EnvVars}}
condition: ne(variables['TestType'],'sample')
Expand Down

0 comments on commit 64bf0b4

Please sign in to comment.