ci: avoid modifying GOAL in 03_test_script.sh

The modification caused "codesign --verify" to be silently skipped.

Introduce BUILD_TARGETS for the cmake target list so GOAL remains
unmodified throughout the script.
This commit is contained in:
Sjors Provoost
2026-03-25 11:03:47 +01:00
parent 7e75b3b922
commit ad4eeaf859

View File

@@ -123,15 +123,16 @@ cmake -S "$BASE_ROOT_DIR" -B "$BASE_BUILD_DIR" "${CMAKE_ARGS[@]}" || (
false false
) )
BUILD_TARGETS="${GOAL}"
if [[ "${GOAL}" != all && "${GOAL}" != *codegen* ]]; then if [[ "${GOAL}" != all && "${GOAL}" != *codegen* ]]; then
GOAL="all ${GOAL}" BUILD_TARGETS="all ${GOAL}"
fi fi
# shellcheck disable=SC2086 # shellcheck disable=SC2086
cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target $GOAL || ( cmake --build "${BASE_BUILD_DIR}" "$MAKEJOBS" --target $BUILD_TARGETS || (
echo "Build failure. Verbose build follows." echo "Build failure. Verbose build follows."
# shellcheck disable=SC2086 # shellcheck disable=SC2086
cmake --build "${BASE_BUILD_DIR}" -j1 --target $GOAL --verbose cmake --build "${BASE_BUILD_DIR}" -j1 --target $BUILD_TARGETS --verbose
false false
) )