From 8e4ea2cbbd929c888963bbf1331065e16a6a1f41 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 27 Feb 2025 17:21:51 +0100 Subject: [PATCH] github: Use all available CPU cores when building --- scripts/test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 1c751aa820..b60dee84d5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -29,7 +29,7 @@ build_botan() cd $BOTAN_DIR && git checkout -qf $BOTAN_REV && ./configure.py --amalgamation $BOTAN_CONFIG && - make -j4 libs >/dev/null && + make -j$(nproc) libs >/dev/null && sudo make install >/dev/null && sudo ldconfig || exit $? cd - @@ -62,7 +62,7 @@ build_wolfssl() git checkout -qf $WOLFSSL_REV && ./autogen.sh && ./configure C_EXTRA_FLAGS="$WOLFSSL_CFLAGS" $WOLFSSL_CONFIG && - make -j4 >/dev/null && + make -j$(nproc) >/dev/null && sudo make install >/dev/null && sudo ldconfig || exit $? cd - @@ -84,7 +84,7 @@ build_tss2() curl -L $TSS2_SRC | tar xz -C $DEPS_BUILD_DIR && cd $TSS2_DIR && ./configure --prefix=$DEPS_PREFIX --disable-doxygen-doc && - make -j4 >/dev/null && + make -j$(nproc) >/dev/null && sudo make install >/dev/null && sudo ldconfig || exit $? cd - @@ -125,7 +125,7 @@ build_openssl() else cd $SSL_DIR && ./config --prefix=$SSL_INS --openssldir=$SSL_INS --libdir=lib $SSL_OPT && - make -j4 >/dev/null && + make -j$(nproc) >/dev/null && sudo make install_sw >/dev/null && sudo ldconfig || exit $? cd - @@ -542,10 +542,10 @@ case "$TEST" in sonarcloud) # without target, coverage is currently not supported anyway because # sonarqube only supports gcov, not lcov - build-wrapper-linux-x86-64 --out-dir bw-output make -j4 || exit $? + build-wrapper-linux-x86-64 --out-dir bw-output make -j$(nproc) || exit $? ;; *) - make -j4 $TARGET || exit $? + make -j$(nproc) $TARGET || exit $? ;; esac -- 2.47.2