chore(ci): limit number of parallel builds to prevent runner resource starvation (#6683)

This commit is contained in:
Peter Feerick
2025-10-20 13:04:05 +10:00
committed by GitHub
parent f194260070
commit 12b9d8dbef
9 changed files with 76 additions and 48 deletions
+7 -7
View File
@@ -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