Skip to content

Commit

Permalink
chore(ci): set CARGO_BUILD_JOBS to half the number of core for Window…
Browse files Browse the repository at this point in the history
…s runner (vectordotdev#10250)
  • Loading branch information
prognant authored Dec 3, 2021
1 parent be22095 commit 2d66a10
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/environment/bootstrap-windows-2019.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
if ($env:CI -ne $null) {
echo "$HOME\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "CARGO_BUILD_JOBS=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
$N_JOBS=(((Get-CimInstance -ClassName Win32_ComputerSystem).NumberOfLogicalProcessors / 2),1 | Measure-Object -Max).Maximum
echo "CARGO_BUILD_JOBS=$N_JOBS" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} else {
$env:Path += ";$HOME\.cargo\bin"
}

0 comments on commit 2d66a10

Please sign in to comment.