diff --git a/.circleci/scripts/binary_populate_env.sh b/.circleci/scripts/binary_populate_env.sh index f12a3ac0751..11f96785799 100755 --- a/.circleci/scripts/binary_populate_env.sh +++ b/.circleci/scripts/binary_populate_env.sh @@ -163,8 +163,13 @@ if [[ "$(uname)" != Darwin ]]; then MEMORY_LIMIT_MAX_JOBS=12 NUM_CPUS=$(( $(nproc) - 2 )) - # Defaults here for **binary** linux builds so they can be changed in one place - export MAX_JOBS=${MAX_JOBS:-$(( ${NUM_CPUS} > ${MEMORY_LIMIT_MAX_JOBS} ? ${MEMORY_LIMIT_MAX_JOBS} : ${NUM_CPUS} ))} + if [[ "$(uname)" == Linux ]]; then + # Defaults here for **binary** linux builds so they can be changed in one place + export MAX_JOBS=${MAX_JOBS:-$(( ${NUM_CPUS} > ${MEMORY_LIMIT_MAX_JOBS} ? ${MEMORY_LIMIT_MAX_JOBS} : ${NUM_CPUS} ))} + else + # For other builds + export MAX_JOBS=${NUM_CPUS} + fi cat >>"$envfile" <