chore(ci): limit number of parallel builds to prevent runner resource starvation (#6683)
This commit is contained in:
+7
-7
@@ -1,16 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Stops on first error, echo on
|
||||
# Stop on first error, echo on
|
||||
set -e
|
||||
set -x
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
. "$SCRIPT_DIR/build-common.sh"
|
||||
|
||||
|
||||
# If no build target, exit
|
||||
#: "${FLAVOR:=ALL}"
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
case $i in
|
||||
@@ -58,6 +54,9 @@ COMMON_OPTIONS+=${EXTRA_OPTIONS}" "
|
||||
|
||||
: "${FIRMARE_TARGET:="firmware-size"}"
|
||||
|
||||
# Determine parallel jobs
|
||||
determine_max_jobs
|
||||
|
||||
# workaround for GH repo owner
|
||||
git config --global --add safe.directory "$(pwd)"
|
||||
|
||||
@@ -81,8 +80,9 @@ do
|
||||
fi
|
||||
|
||||
cmake ${BUILD_OPTIONS} "${SRCDIR}"
|
||||
cmake --build . --target arm-none-eabi-configure --parallel ${MAX_JOBS}
|
||||
cmake --build arm-none-eabi --target ${FIRMARE_TARGET} --parallel ${MAX_JOBS}
|
||||
|
||||
cmake_build_parallel . --target arm-none-eabi-configure
|
||||
cmake_build_parallel arm-none-eabi --target ${FIRMARE_TARGET}
|
||||
|
||||
rm -f CMakeCache.txt arm-none-eabi/CMakeCache.txt
|
||||
|
||||
|
||||
Reference in New Issue
Block a user