From 517ff4391abcf62f8c20cf8423ae979c5d5939b4 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 9 Aug 2021 19:50:40 -0400 Subject: [PATCH] use more cores for make on unix systems --- .github/scripts/unix.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/scripts/unix.sh b/.github/scripts/unix.sh index 55a8ac372..6abbb5596 100644 --- a/.github/scripts/unix.sh +++ b/.github/scripts/unix.sh @@ -92,7 +92,11 @@ function build () configure - make -j2 + if [ "$(uname)" == "Linux" ]; then + make -j$(nproc) + elif [ "$(uname)" == "Darwin" ]; then + make -j$(sysctl -n hw.physicalcpu) + fi finish } @@ -105,8 +109,12 @@ function test () configure - # Actual build: - make -j2 check + # Actual testing + if [ "$(uname)" == "Linux" ]; then + make -j$(nproc) + elif [ "$(uname)" == "Darwin" ]; then + make -j$(sysctl -n hw.physicalcpu) + fi finish }