mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-14 03:58:18 +00:00
Abort build script if CMake build failed for any architecture
Abort the build script when the CMake build fails for any of the selected architectures. Previously, the build may have continued and caused an APK without the respective library files to be built.
This commit is contained in:
parent
c8f0391c62
commit
1a3b2eac10
|
@ -151,21 +151,40 @@ mkdir "${_DEFAULT_BUILD_FOLDER}"
|
||||||
|
|
||||||
if [[ "${_DEFAULT_ANDROID_BUILD}" == "arm" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
if [[ "${_DEFAULT_ANDROID_BUILD}" == "arm" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
||||||
build_for_type arm armeabi-v7a armv7-linux-androideabi &
|
build_for_type arm armeabi-v7a armv7-linux-androideabi &
|
||||||
|
PID_BUILD_ARM=$!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${_DEFAULT_ANDROID_BUILD}" == "arm64" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
if [[ "${_DEFAULT_ANDROID_BUILD}" == "arm64" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
||||||
build_for_type arm64 arm64-v8a aarch64-linux-android &
|
build_for_type arm64 arm64-v8a aarch64-linux-android &
|
||||||
|
PID_BUILD_ARM64=$!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${_DEFAULT_ANDROID_BUILD}" == "x86" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
if [[ "${_DEFAULT_ANDROID_BUILD}" == "x86" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
||||||
build_for_type x86 x86 i686-linux-android &
|
build_for_type x86 x86 i686-linux-android &
|
||||||
|
PID_BUILD_X86=$!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${_DEFAULT_ANDROID_BUILD}" == "x86_64" || "${_DEFAULT_ANDROID_BUILD}" == "x64" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
if [[ "${_DEFAULT_ANDROID_BUILD}" == "x86_64" || "${_DEFAULT_ANDROID_BUILD}" == "x64" || "${_DEFAULT_ANDROID_BUILD}" == "all" ]]; then
|
||||||
build_for_type x86_64 x86_64 x86_64-linux-android &
|
build_for_type x86_64 x86_64 x86_64-linux-android &
|
||||||
|
PID_BUILD_X86_64=$!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
wait
|
if [ -n "$PID_BUILD_ARM" ] && ! wait "$PID_BUILD_ARM"; then
|
||||||
|
printf "\e[31m%s\e[30m\n" "Building for arm failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -n "$PID_BUILD_ARM64" ] && ! wait "$PID_BUILD_ARM64"; then
|
||||||
|
printf "\e[31m%s\e[30m\n" "Building for arm64 failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -n "$PID_BUILD_X86" ] && ! wait "$PID_BUILD_X86"; then
|
||||||
|
printf "\e[31m%s\e[30m\n" "Building for x86 failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ -n "$PID_BUILD_X86_64" ] && ! wait "$PID_BUILD_X86_64"; then
|
||||||
|
printf "\e[31m%s\e[30m\n" "Building for x86_64 failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
printf "\e[36mPreparing gradle build\n"
|
printf "\e[36mPreparing gradle build\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue