Skip to content

Commit

Permalink
Use at least 2 cores
Browse files Browse the repository at this point in the history
  • Loading branch information
dellaert committed Feb 17, 2022
1 parent 5905110 commit b65c89c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/scripts/unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ function build ()
configure

if [ "$(uname)" == "Linux" ]; then
make -j$(nproc)
if (($(nproc) > 2)); then
make -j$(nproc)
else
make -j2
fi
elif [ "$(uname)" == "Darwin" ]; then
make -j$(sysctl -n hw.physicalcpu)
fi
Expand All @@ -113,7 +117,11 @@ function test ()

# Actual testing
if [ "$(uname)" == "Linux" ]; then
make -j$(nproc) check
if (($(nproc) > 2)); then
make -j$(nproc) check
else
make -j2 check
fi
elif [ "$(uname)" == "Darwin" ]; then
make -j$(sysctl -n hw.physicalcpu) check
fi
Expand Down

0 comments on commit b65c89c

Please sign in to comment.