]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CI: Use only the active CPUs on macOS 108/head
authorRyan Carsten Schmidt <git@ryandesign.com>
Sat, 13 Apr 2024 00:31:13 +0000 (19:31 -0500)
committerGitHub <noreply@github.com>
Sat, 13 Apr 2024 00:31:13 +0000 (19:31 -0500)
hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts
only the active CPUs.

build-aux/ci_build.bash

index d40cd3ce2206b885437325c915a08f346768fc3d..50e98f4cc08d9df6b0988c1b194967079668d01e 100755 (executable)
@@ -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"