CI: Use only the active CPUs on macOS

hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts
only the active CPUs.
This commit is contained in:
Ryan Carsten Schmidt 2024-04-12 19:31:13 -05:00 committad av GitHub
förälder 73f629e321
incheckning 97f0ee0f1f
Ingen känd nyckel hittad för denna signaturen i databasen
GPG-nyckel ID: B5690EEEBB952194
1 ändrade filer med 1 tillägg och 1 borttagningar

Visa fil

@ -48,7 +48,7 @@ DEST_DIR="$SRC_DIR/../xz_build"
PHASE="all"
ARTIFACTS_DIR_NAME="output"
[[ -z ${CPU_COUNT} ]] && { CPU_COUNT=$(nproc 2>/dev/null || sysctl -n hw.ncpu); }
[[ -z ${CPU_COUNT} ]] && { CPU_COUNT=$(nproc 2>/dev/null || sysctl -n hw.activecpu); }
[[ -z ${MAKEFLAGS} ]] && export MAKEFLAGS="-j${CPU_COUNT} -l${CPU_COUNT}"
[[ -z ${CFLAGS} ]] && export CFLAGS="-O2"