diff options
author | Sam James <sam@gentoo.org> | 2024-04-10 17:42:23 +0100 |
---|---|---|
committer | Lasse Collin <lasse.collin@tukaani.org> | 2024-04-11 00:15:35 +0300 |
commit | 8709407a9ef8e7e8aec117879400e4dd3e227ada (patch) | |
tree | 60f0850dac06df12607a4c563d59178f9881b047 | |
parent | ci: default to -O2 (diff) | |
download | xz-8709407a9ef8e7e8aec117879400e4dd3e227ada.tar.xz |
ci: build in parallel by default
-rwxr-xr-x | build-aux/ci_build.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/build-aux/ci_build.sh b/build-aux/ci_build.sh index da780f33..d40cd3ce 100755 --- a/build-aux/ci_build.sh +++ b/build-aux/ci_build.sh @@ -48,6 +48,8 @@ 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 ${MAKEFLAGS} ]] && export MAKEFLAGS="-j${CPU_COUNT} -l${CPU_COUNT}" [[ -z ${CFLAGS} ]] && export CFLAGS="-O2" ################### |