Skip to content

Commit

Permalink
Merge pull request #4293 from talregev/TalR_arrange_android_ci
Browse files Browse the repository at this point in the history
[Android] Arrange android ci
  • Loading branch information
AenBleidd authored Mar 30, 2021
2 parents f333e6f + bab0ef9 commit 2996c93
Show file tree
Hide file tree
Showing 14 changed files with 153 additions and 124 deletions.
1 change: 0 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
with:
path: 3rdParty/buildCache
key: android-${{ matrix.type }}-${{ hashFiles('android/*.sh') }}
restore-keys: android-${{ matrix.type }}-

- name: Build manager
if: ${{ success() && matrix.type == 'manager' }}
Expand Down
43 changes: 20 additions & 23 deletions android/buildAndroidBOINC-CI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ if [ "${silent}" = "yes" ]; then
export STDOUT_TARGET="/dev/null"
fi

export COMPILEOPENSSL="no"
export COMPILECURL="no"
export ANDROID_TC_FLAGFILE="$PREFIX/ANDROID_TC_WITH_NDK-${NDK_VERSION}-${arch}-${REV}_done"
export NDK_FLAGFILE="$PREFIX/NDK-${NDK_VERSION}-${REV}_done"
export NDK_ARMV6_FLAGFILE="$PREFIX/NDK-${NDK_ARMV6_VERSION}-armv6-${ARMV6_REV}_done"
export NDK_ROOT=$BUILD_DIR/android-ndk-r${NDK_VERSION}
Expand All @@ -159,9 +156,11 @@ export BUILD_WITH_VCPKG=$build_with_vcpkg
if [ "$arch" = armv6 ]; then
export CURL_FLAGFILE="$PREFIX/curl-${CURL_VERSION}-${NDK_ARMV6_VERSION}-${arch}_done"
export OPENSSL_FLAGFILE="$PREFIX/openssl-${OPENSSL_VERSION}-${NDK_ARMV6_VERSION}-${arch}_done"
export ANDROID_TC_FLAGFILE="$PREFIX/ANDROID_TC_WITH_NDK-${NDK_ARMV6_VERSION}-${arch}-${ARMV6_REV}_done"
else
export CURL_FLAGFILE="$PREFIX/curl-${CURL_VERSION}-${NDK_VERSION}-${arch}_done"
export OPENSSL_FLAGFILE="$PREFIX/openssl-${OPENSSL_VERSION}-${NDK_VERSION}-${arch}_done"
export ANDROID_TC_FLAGFILE="$PREFIX/ANDROID_TC_WITH_NDK-${NDK_VERSION}-${arch}-${REV}_done"
fi

createNDKFolder()
Expand All @@ -183,25 +182,9 @@ if [ ! -e "${NDK_FLAGFILE}" ]; then
touch "${NDK_FLAGFILE}"
fi

if [ ! -e "${ANDROID_TC_FLAGFILE}" ]; then
if [ $arch != "armv6" ]; then
rm -rf "${PREFIX}/${arch}"
echo delete "${PREFIX}/${arch}"
rm -rf "${OPENSSL_FLAGFILE}"
rm -rf "${CURL_FLAGFILE}"
touch ${ANDROID_TC_FLAGFILE}
fi
fi

if [ ! -e "${NDK_ARMV6_FLAGFILE}" ]; then
if [ $arch = "armv6" ]; then
rm -rf "${PREFIX}/${arch}"
echo delete "${PREFIX}/${arch}"
rm -rf "${OPENSSL_FLAGFILE}"
rm -rf "${CURL_FLAGFILE}"
createNDKARMV6Folder
touch "${NDK_ARMV6_FLAGFILE}"
fi
createNDKARMV6Folder
touch "${NDK_ARMV6_FLAGFILE}"
fi

if [ ! -d $NDK_ROOT ]; then
Expand All @@ -212,18 +195,24 @@ if [ ! -d $NDK_ARMV6_ROOT ]; then
createNDKARMV6Folder
fi

if [ ! -e "${ANDROID_TC_FLAGFILE}" ]; then
rm -rf "${PREFIX}/${arch}"
echo delete "${PREFIX}/${arch}"
rm -rf "${OPENSSL_FLAGFILE}"
rm -rf "${CURL_FLAGFILE}"
touch ${ANDROID_TC_FLAGFILE}
fi

if [ ! -e "${OPENSSL_FLAGFILE}" ]; then
rm -rf "$BUILD_DIR/openssl-${OPENSSL_VERSION}"
wget -c --no-verbose -O /tmp/openssl_${OPENSSL_VERSION}.tgz https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
tar xzf /tmp/openssl_${OPENSSL_VERSION}.tgz --directory=$BUILD_DIR
export COMPILEOPENSSL="yes"
fi

if [ ! -e "${CURL_FLAGFILE}" ]; then
rm -rf "$BUILD_DIR/curl-${CURL_VERSION}"
wget -c --no-verbose -O /tmp/curl_${CURL_VERSION}.tgz https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz
tar xzf /tmp/curl_${CURL_VERSION}.tgz --directory=$BUILD_DIR
export COMPILECURL="yes"
fi

patchVcpkgScripts()
Expand Down Expand Up @@ -427,6 +416,11 @@ Armv6TestApps()
Armv6Test boinc_gahp uc2 ucn multi_thread sleeper worker wrapper wrappture_example fermi
}

NeonTestApps()
{
NeonTest boinc_gahp uc2 ucn multi_thread sleeper worker wrapper
}

RenameAllApps()
{
list_apps="../samples/condor/ boinc_gahp
Expand Down Expand Up @@ -478,6 +472,7 @@ case "$arch" in
./build_libraries_armv6.sh
./build_example_armv6.sh
NeonTestLibs
NeonTestApps
Armv6TestLibs
Armv6TestApps
if [ "$ci" = "yes" ]; then
Expand Down Expand Up @@ -510,6 +505,8 @@ case "$arch" in
./build_curl_arm.sh
./build_libraries_arm.sh
./build_example_arm.sh
NeonTestLibs
NeonTestApps
if [ "$ci" = "yes" ]; then
RenameAllApps arm
fi
Expand Down
20 changes: 11 additions & 9 deletions android/build_curl_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e

# Script to compile Libcurl for Android

COMPILECURL="${COMPILECURL:-yes}"
STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
Expand Down Expand Up @@ -36,7 +35,7 @@ export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent 1>$STDOUT_TARGET"
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi
Expand All @@ -47,7 +46,7 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ "$COMPILECURL" = "yes" ]; then
if [ ! -e "${CURL_FLAGFILE}" ]; then
cd "$CURL"
echo "===== building curl for arm from $PWD ====="
if [ -n "$MAKECLEAN" ] && $(grep -q "^distclean:" "${CURL}/Makefile"); then
Expand All @@ -60,12 +59,15 @@ if [ "$COMPILECURL" = "yes" ]; then
if [ -n "$CONFIGURE" ]; then
./configure --host=arm-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom --without-zlib 1>$STDOUT_TARGET
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS

if [ ! -z ${CURL_FLAGFILE} ]; then
touch "${CURL_FLAGFILE}"
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
fi
touch "${CURL_FLAGFILE}"
echo "===== curl for arm build done ====="
fi
21 changes: 12 additions & 9 deletions android/build_curl_arm64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e

# Script to compile Libcurl for Android

COMPILECURL="${COMPILECURL:-yes}"
STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
Expand Down Expand Up @@ -36,7 +35,7 @@ export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent 1>$STDOUT_TARGET"
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi
Expand All @@ -47,7 +46,7 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ "$COMPILECURL" = "yes" ]; then
if [ ! -e "${CURL_FLAGFILE}" ]; then
cd "$CURL"
echo "===== building curl for arm64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && $(grep -q "^distclean:" "${CURL}/Makefile"); then
Expand All @@ -60,12 +59,16 @@ if [ "$COMPILECURL" = "yes" ]; then
if [ -n "$CONFIGURE" ]; then
./configure --host=aarch64-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom 1>$STDOUT_TARGET
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS

if [ ! -z ${CURL_FLAGFILE} ]; then
touch "${CURL_FLAGFILE}"
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
fi

touch "${CURL_FLAGFILE}"
echo "===== curl for arm64 build done ====="
fi
21 changes: 12 additions & 9 deletions android/build_curl_armv6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e

# Script to compile Libcurl for Android

COMPILECURL="${COMPILECURL:-yes}"
STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
Expand Down Expand Up @@ -38,7 +37,7 @@ export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent 1>$STDOUT_TARGET"
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi
Expand All @@ -49,7 +48,7 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ "$COMPILECURL" = "yes" ]; then
if [ ! -e "${CURL_FLAGFILE}" ]; then
cd "$CURL"
echo "===== building curl for armv6 from $PWD ====="
if [ -n "$MAKECLEAN" ] && $(grep -q "^distclean:" "${CURL}/Makefile"); then
Expand All @@ -62,12 +61,16 @@ if [ "$COMPILECURL" = "yes" ]; then
if [ -n "$CONFIGURE" ]; then
./configure --host=armv6-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom --without-zlib 1>$STDOUT_TARGET
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
fi

if [ ! -z ${CURL_FLAGFILE} ]; then
touch "${CURL_FLAGFILE}"
fi
touch "${CURL_FLAGFILE}"
echo "===== curl for armv6 build done ====="
fi
21 changes: 12 additions & 9 deletions android/build_curl_x86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e

# Script to compile Libcurl for Android

COMPILECURL="${COMPILECURL:-yes}"
STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
Expand Down Expand Up @@ -36,7 +35,7 @@ export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent 1>$STDOUT_TARGET"
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi
Expand All @@ -47,7 +46,7 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ "$COMPILECURL" = "yes" ]; then
if [ ! -e "${CURL_FLAGFILE}" ]; then
cd "$CURL"
echo "===== building curl for x86 from $PWD ====="
if [ -n "$MAKECLEAN" ] && $(grep -q "^distclean:" "${CURL}/Makefile"); then
Expand All @@ -60,12 +59,16 @@ if [ "$COMPILECURL" = "yes" ]; then
if [ -n "$CONFIGURE" ]; then
./configure --host=i686-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom 1>$STDOUT_TARGET
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS

if [ ! -z ${CURL_FLAGFILE} ]; then
touch "${CURL_FLAGFILE}"
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
fi

touch "${CURL_FLAGFILE}"
echo "===== curl for x86 build done ====="
fi
21 changes: 12 additions & 9 deletions android/build_curl_x86_64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set -e

# Script to compile Libcurl for Android

COMPILECURL="${COMPILECURL:-yes}"
STDOUT_TARGET="${STDOUT_TARGET:-/dev/stdout}"
CONFIGURE="yes"
MAKECLEAN="yes"
Expand Down Expand Up @@ -36,7 +35,7 @@ export GDB_CFLAGS="--sysroot=$TCSYSROOT -Wall -g -I$TCINCLUDES/include"
MAKE_FLAGS=""

if [ $VERBOSE = "no" ]; then
MAKE_FLAGS="$MAKE_FLAGS --silent 1>$STDOUT_TARGET"
MAKE_FLAGS="$MAKE_FLAGS --silent"
else
MAKE_FLAGS="$MAKE_FLAGS SHELL=\"/bin/bash -x\""
fi
Expand All @@ -47,7 +46,7 @@ else
MAKE_FLAGS="$MAKE_FLAGS -j $NPROC_USER"
fi

if [ "$COMPILECURL" = "yes" ]; then
if [ ! -e "${CURL_FLAGFILE}" ]; then
cd "$CURL"
echo "===== building curl for x86-64 from $PWD ====="
if [ -n "$MAKECLEAN" ] && $(grep -q "^distclean:" "${CURL}/Makefile"); then
Expand All @@ -60,12 +59,16 @@ if [ "$COMPILECURL" = "yes" ]; then
if [ -n "$CONFIGURE" ]; then
./configure --host=x86_64-linux --prefix="$TCINCLUDES" --libdir="$TCINCLUDES/lib" --disable-shared --enable-static --with-random=/dev/urandom 1>$STDOUT_TARGET
fi
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS

if [ ! -z ${CURL_FLAGFILE} ]; then
touch "${CURL_FLAGFILE}"
if [ $VERBOSE = "no" ]; then
echo MAKE_FLAGS=$MAKE_FLAGS "1>$STDOUT_TARGET"
make $MAKE_FLAGS 1>$STDOUT_TARGET
make install $MAKE_FLAGS 1>$STDOUT_TARGET
else
echo MAKE_FLAGS=$MAKE_FLAGS
make $MAKE_FLAGS
make install $MAKE_FLAGS
fi

touch "${CURL_FLAGFILE}"
echo "===== curl for x86-64 build done ====="
fi
Loading

0 comments on commit 2996c93

Please sign in to comment.