diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index 4e01051073..f9e5c57c34 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -151,7 +151,7 @@ jobs: if [ -z "${{ vars.SELF_HOSTED }}" ]; then brew install automake texinfo libtool pkgconf yasm nasm fi - ./build_release_macos.sh -dx ${{ !vars.SELF_HOSTED && '-1' || '' }} -a ${{ inputs.arch }} -t 10.15 + ./build_release_macos.sh -dx ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a ${{ inputs.arch }} -t 10.15 (cd "${{ github.workspace }}/deps/build/${{ inputs.arch }}" && \ find . -mindepth 1 -maxdepth 1 ! -name 'OrcaSlicer_dep' -exec rm -rf {} +) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index e8dcef0b05..c73524d6f0 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -145,7 +145,7 @@ jobs: env: ORCA_TESTS_BUILD_ONLY: ${{ inputs.arch == 'arm64' && '1' || '' }} run: | - ./build_release_macos.sh -s -n -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a ${{ inputs.arch }} -t 10.15 ${{ inputs.arch == 'arm64' && '-T' || '' }} + ./build_release_macos.sh -s -n -x ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a ${{ inputs.arch }} -t 10.15 ${{ inputs.arch == 'arm64' && '-T' || '' }} - name: Pack unit tests mac if: runner.os == 'macOS' && !inputs.macos-combine-only && inputs.arch == 'arm64' @@ -204,7 +204,7 @@ jobs: if: runner.os == 'macOS' && inputs.macos-combine-only working-directory: ${{ github.workspace }} run: | - ./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-1' || '' }} -a universal -t 10.15 + ./build_release_macos.sh -u -x ${{ !vars.SELF_HOSTED && '-j 3' || '' }} -a universal -t 10.15 # Thanks to RaySajuuk, it's working now - name: Sign app and notary diff --git a/build_release_macos.sh b/build_release_macos.sh index 2fd7b26cd8..b1de5df2e4 100755 --- a/build_release_macos.sh +++ b/build_release_macos.sh @@ -4,7 +4,7 @@ set -e set -o pipefail SECONDS=0 -while getopts ":dpa:snt:xbc:i:1Tuh" opt; do +while getopts ":dpa:snt:xbc:i:j:Tuh" opt; do case "${opt}" in d ) export BUILD_TARGET="deps" @@ -38,8 +38,8 @@ while getopts ":dpa:snt:xbc:i:1Tuh" opt; do i ) export CMAKE_IGNORE_PREFIX_PATH="${CMAKE_IGNORE_PREFIX_PATH:+$CMAKE_IGNORE_PREFIX_PATH;}$OPTARG" ;; - 1 ) - export CMAKE_BUILD_PARALLEL_LEVEL=1 + j ) + export CMAKE_BUILD_PARALLEL_LEVEL="$OPTARG" ;; T ) export BUILD_TESTS="1" @@ -58,7 +58,7 @@ while getopts ":dpa:snt:xbc:i:1Tuh" opt; do echo " -b: Build without reconfiguring CMake" echo " -c: Set CMake build configuration, default is Release" echo " -i: Add a prefix to ignore during CMake dependency discovery (repeatable), defaults to /opt/local:/usr/local:/opt/homebrew" - echo " -1: Use single job for building" + echo " -j: Set the number of parallel build jobs (CMAKE_BUILD_PARALLEL_LEVEL)" echo " -T: Build and run tests (set ORCA_TESTS_BUILD_ONLY=1 to build without running)" exit 0 ;;