Changeset View
Changeset View
Standalone View
Standalone View
contrib/teamcity/build-configurations.sh
Show All 10 Lines | if [ $# -ge 1 ]; then | ||||
shift | shift | ||||
fi | fi | ||||
if [ -z "${ABC_BUILD_NAME}" ]; then | if [ -z "${ABC_BUILD_NAME}" ]; then | ||||
echo "Error: Environment variable ABC_BUILD_NAME must be set" | echo "Error: Environment variable ABC_BUILD_NAME must be set" | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
echo "Running build configuration '${ABC_BUILD_NAME}'..." | |||||
TOPLEVEL=$(git rev-parse --show-toplevel) | TOPLEVEL=$(git rev-parse --show-toplevel) | ||||
export TOPLEVEL | python3 "${TOPLEVEL}/contrib/teamcity/build-configurations.py" "${ABC_BUILD_NAME}" | ||||
# Use separate build dirs to get the most out of ccache and prevent crosstalk | |||||
: "${BUILD_DIR:=${TOPLEVEL}/${ABC_BUILD_NAME}}" | |||||
mkdir -p "${BUILD_DIR}" | |||||
BUILD_DIR=$(cd "${BUILD_DIR}"; pwd) | |||||
export BUILD_DIR | |||||
cd "${BUILD_DIR}" | |||||
# Determine the number of build threads | |||||
THREADS=$(nproc || sysctl -n hw.ncpu) | |||||
export THREADS | |||||
export CMAKE_PLATFORMS_DIR="${TOPLEVEL}/cmake/platforms" | |||||
# Check the script exists | |||||
SCRIPT_PATH="${TOPLEVEL}/contrib/teamcity/builds/${ABC_BUILD_NAME}.sh" | |||||
if [ ! -x "${SCRIPT_PATH}" ]; then | |||||
echo "${SCRIPT_PATH} does not exist or is not executable" | |||||
exit 1 | |||||
fi | |||||
# Run the script | |||||
"${SCRIPT_PATH}" |