Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .azure-pipelines/common-templates/install-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ steps:
script: |
Write-Output $PSVersionTable

- task: NodeTool@0
- task: UseNode@1
displayName: Install NodeJs
retryCountOnTaskFailure: 2
inputs:
versionSpec: 18.x
version: 22.x

- task: PowerShell@2
displayName: Configure private npm feed
Expand Down Expand Up @@ -93,7 +93,7 @@ steps:
inputs:
command: custom
workingDir: $(Build.SourcesDirectory)
customCommand: install --no-package-lock @microsoft/rush
customCommand: install --no-package-lock @microsoft/rush@5.170.1

- task: PowerShell@2
displayName: Rush Build
Expand Down
5 changes: 2 additions & 3 deletions tools/GenerateModules.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if (-not ($RushInstalled -and $AutoRestInstalled)) {
Write-Host "Node build tools not found at '$RepoRoot'. Installing rush and autorest..."
Push-Location $RepoRoot
try {
npm install --no-package-lock '@microsoft/rush' 'autorest@3.7.2' '@autorest/core@3.10.4'
npm install --no-package-lock '@microsoft/rush@5.170.1' 'autorest@3.7.2' '@autorest/core@3.10.4'
if ($LASTEXITCODE -ne 0) {
throw "Command 'npm install' for Node build tools (rush, autorest) failed with exit code $LASTEXITCODE."
}
Expand Down Expand Up @@ -159,8 +159,7 @@ $AutoRestTempFolder | ForEach-Object {
}

$Stopwatch = [system.diagnostics.stopwatch]::StartNew()
$CpuCount = (Get-CimInstance Win32_Processor | Measure-Object -Property NumberOfLogicalProcessors -Sum).Sum
$Throttle = [int][math]::Max(1, [math]::Min(4, $CpuCount / 2)) # Use half the CPU count but max 4, min 1
$Throttle = 1
$Results = $ModuleToGenerate | ForEach-Object -Parallel {
$Module = $_
Write-Host -ForegroundColor Green "-------------'Generating $Module'-------------"
Expand Down
Loading