From dc3f7dea549bb9a6769c221f1cb54439a6b793da Mon Sep 17 00:00:00 2001 From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Sun, 25 Feb 2024 12:17:20 +0100 Subject: [PATCH] ACTIONS: use max CPU cores count on gh runners (#93) `getconf _NPROCESSORS_ONLN` for Linux system --- .github/workflows/build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 85ae5824..119c4cac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,9 +49,10 @@ jobs: #apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion sudo apt update && sudo apt install -y gsfonts make miyoo_uclibc_defconfig + CPU_N=$(getconf _NPROCESSORS_ONLN) set -o pipefail if ! ( \ - make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" APPEND_VERSION="-Dev_build" 2>&1 \ + make -j $CPU_N sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" APPEND_VERSION="-Dev_build" 2>&1 \ | tee build.log \ | grep ">>>" \ ); then tail -n100 build.log && exit 1 @@ -133,9 +134,10 @@ jobs: #apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion sudo apt update && sudo apt install -y gsfonts make miyoo_musl_defconfig + CPU_N=$(getconf _NPROCESSORS_ONLN) set -o pipefail if ! ( \ - make sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" APPEND_VERSION="-Dev_build" 2>&1 \ + make -j $CPU_N sdk CFW_HASH="${{ steps.cfwsha.outputs.cfwsha }}" APPEND_VERSION="-Dev_build" 2>&1 \ | tee build.log \ | grep ">>>" \ ); then tail -n100 build.log && exit 1 @@ -209,9 +211,10 @@ jobs: run: | cd ${{ inputs.submodule || '.' }} make miyoo_uclibc_static_defconfig + CPU_N=$(getconf _NPROCESSORS_ONLN) set -o pipefail if ! ( \ - make sdk 2>&1 \ + make -j $CPU_N sdk 2>&1 \ | tee build.log \ | grep ">>>" \ ); then tail -n100 build.log && exit 1 @@ -261,9 +264,10 @@ jobs: run: | cd ${{ inputs.submodule || '.' }} make miyoo_musl_static_defconfig + CPU_N=$(getconf _NPROCESSORS_ONLN) set -o pipefail if ! ( \ - make sdk 2>&1 \ + make -j $CPU_N sdk 2>&1 \ | tee build.log \ | grep ">>>" \ ); then tail -n100 build.log && exit 1