Skip to content

Commit

Permalink
Make Windows build environment parallel (#2080)
Browse files Browse the repository at this point in the history
* Make Windows build environment parallel with help of Ninja

* Add number of processors explicitly as an argument to CMake

---------

Co-authored-by: Marc Alff <[email protected]>
  • Loading branch information
cngzhnp and marcalff authored Apr 1, 2023
1 parent 0139cb4 commit 9bcfcb9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ci/do_ci.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ trap { $host.SetShouldExit(1) }

$action = $args[0]

$nproc = (Get-ComputerInfo).CsNumberOfLogicalProcessors

$SRC_DIR = (Get-Item -Path ".\").FullName

$BAZEL_OPTIONS = "--copt=-DENABLE_LOGS_PREVIEW --copt=-DENABLE_ASYNC_EXPORT"
Expand Down Expand Up @@ -40,7 +42,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -61,7 +63,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand Down Expand Up @@ -90,7 +92,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -111,7 +113,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -132,7 +134,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -154,7 +156,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -176,7 +178,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -197,7 +199,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand All @@ -214,7 +216,7 @@ switch ($action) {
if ($exit -ne 0) {
exit $exit
}
cmake --build .
cmake --build . -j $nproc
$exit = $LASTEXITCODE
if ($exit -ne 0) {
exit $exit
Expand Down

0 comments on commit 9bcfcb9

Please sign in to comment.