]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
github: Use all available CPU cores when building
authorTobias Brunner <tobias@strongswan.org>
Thu, 27 Feb 2025 16:21:51 +0000 (17:21 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Feb 2025 11:55:12 +0000 (12:55 +0100)
scripts/test.sh

index 1c751aa820e9d6d9a27f5068ec3f66ae48c4b6c6..b60dee84d5ff19bf5a9b5eb1733c860603e907b8 100755 (executable)
@@ -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