Merge pull request #2577 from yalpul/patch-1

CI: Make processor count consistent
This commit is contained in:
Colin Edwards 2020-04-09 00:20:35 -05:00 committed by GitHub
commit 3b27eee20f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,10 +14,8 @@ set -o nounset
# Get CPU count
OS=$(uname)
NPROC=1
if [[ $OS = "Linux" ]] ; then
NPROC=$(nproc)
elif [[ ${OS} = "Darwin" ]] ; then
NPROC=$(sysctl -n hw.physicalcpu)
if [[ $OS = "Linux" || $OS = "Darwin" ]] ; then
NPROC=$(getconf _NPROCESSORS_ONLN)
fi
# Discover clang-format