From 9bcfcb99ffb7e03f9f8d502ccc3c7991bc35fcef Mon Sep 17 00:00:00 2001 From: Cengizhan Pasaoglu Date: Sat, 1 Apr 2023 18:17:40 +0200 Subject: [PATCH] Make Windows build environment parallel (#2080) * Make Windows build environment parallel with help of Ninja * Add number of processors explicitly as an argument to CMake --------- Co-authored-by: Marc Alff --- ci/do_ci.ps1 | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ci/do_ci.ps1 b/ci/do_ci.ps1 index 637e63defc..0ffe716ca1 100644 --- a/ci/do_ci.ps1 +++ b/ci/do_ci.ps1 @@ -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" @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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