mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Merge pull request #4438 from stephan57160/master
Problem: Android CI build scripts need minor enhancements (traces & cleanup)
This commit is contained in:
commit
c19f83027d
@ -3,7 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
function usage {
|
function usage {
|
||||||
echo "Usage ./build.sh [ arm | arm64 | x86 | x86_64 ]"
|
echo "LIBZMQ (${BUILD_ARCH}) - Usage ./build.sh [ arm | arm64 | x86 | x86_64 ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use directory of current script as the build directory and working directory
|
# Use directory of current script as the build directory and working directory
|
||||||
@ -25,17 +25,11 @@ if [ -z $BUILD_ARCH ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $(uname | tr '[:upper:]' '[:lower:]') in
|
platform="$(uname | tr '[:upper:]' '[:lower:]')"
|
||||||
linux*)
|
case "${platform}" in
|
||||||
export HOST_PLATFORM=linux-x86_64
|
linux*) export HOST_PLATFORM=linux-x86_64 ;;
|
||||||
;;
|
darwin*) export HOST_PLATFORM=darwin-x86_64 ;;
|
||||||
darwin*)
|
*) echo "LIBZMQ (${BUILD_ARCH}) - Unsupported platform ('${platform}')" ; exit 1 ;;
|
||||||
export HOST_PLATFORM=darwin-x86_64
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unsupported platform"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Set default values used in ci builds
|
# Set default values used in ci builds
|
||||||
@ -57,7 +51,7 @@ mkdir -p "${cache}"
|
|||||||
|
|
||||||
# Check for environment variable to clear the prefix and do a clean build
|
# Check for environment variable to clear the prefix and do a clean build
|
||||||
if [[ $ANDROID_BUILD_CLEAN ]]; then
|
if [[ $ANDROID_BUILD_CLEAN ]]; then
|
||||||
echo "Doing a clean build (removing previous build and dependencies)..."
|
echo "LIBZMQ (${BUILD_ARCH}) - Doing a clean build (removing previous build and dependencies)..."
|
||||||
rm -rf "${ANDROID_BUILD_PREFIX}"/*
|
rm -rf "${ANDROID_BUILD_PREFIX}"/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -125,4 +119,4 @@ cp "${ANDROID_STL_ROOT}/${ANDROID_STL}" "${ANDROID_BUILD_PREFIX}/lib/."
|
|||||||
# Verify shared libraries in prefix
|
# Verify shared libraries in prefix
|
||||||
|
|
||||||
android_build_verify_so "${VERIFY}" "${ANDROID_STL}"
|
android_build_verify_so "${VERIFY}" "${ANDROID_STL}"
|
||||||
echo "libzmq android build succeeded"
|
echo "LIBZMQ (${BUILD_ARCH}) - Android build successful"
|
||||||
|
@ -7,6 +7,8 @@ export NDK_VERSION=android-ndk-r25
|
|||||||
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
|
export ANDROID_NDK_ROOT="/tmp/${NDK_VERSION}"
|
||||||
|
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
|
rm -rf /tmp/android_build/
|
||||||
|
rm -rf prefix/
|
||||||
rm -rf /tmp/tmp-deps
|
rm -rf /tmp/tmp-deps
|
||||||
mkdir -p /tmp/tmp-deps
|
mkdir -p /tmp/tmp-deps
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user