summaryrefslogtreecommitdiffstats
path: root/scripts/android
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-22 18:55:43 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-30 11:20:34 -0800
commitf11f4dc139044c1717f05899c89d2f2436a0f910 (patch)
tree45a2bff27b50c5a2008a3038094ee808521df36a /scripts/android
parentf39b07dec3bfef91a80b753bc1cf5d989ec2e669 (diff)
downloadsubsurface-f11f4dc139044c1717f05899c89d2f2436a0f910.tar.gz
Travis: use Android docker image for build
This should make it easier to make changes to our build environment. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/android')
-rw-r--r--scripts/android/after_success.sh2
-rw-r--r--scripts/android/before_install.sh24
-rw-r--r--scripts/android/travisbuild.sh12
3 files changed, 18 insertions, 20 deletions
diff --git a/scripts/android/after_success.sh b/scripts/android/after_success.sh
index c1a8d7e01..622b5e20e 100644
--- a/scripts/android/after_success.sh
+++ b/scripts/android/after_success.sh
@@ -12,4 +12,4 @@ ls -lh $TRAVIS_BUILD_DIR/apk/*.apk
# get and run the upload script
wget -c https://raw.githubusercontent.com/dirkhh/uploadtool/master/upload.sh
-bash ./upload.sh $TRAVIS_BUILD_DIR/apk/*.apk
+bash ./upload.sh $TRAVIS_BUILD_DIR/../subsurface-mobile-build-arm/build/outputs/apk/*.apk
diff --git a/scripts/android/before_install.sh b/scripts/android/before_install.sh
index 22c55aec8..28db5b200 100644
--- a/scripts/android/before_install.sh
+++ b/scripts/android/before_install.sh
@@ -6,14 +6,16 @@ git fetch --unshallow
git pull --tags
git describe
-# Ugly, but keeps it running during the build
-docker run -v $PWD:/workspace/subsurface --name=builder -w /workspace -d ubuntu:bionic /bin/sleep 60m
-docker exec -t builder apt-get update
-# subsurface android build dependencies
-docker exec -t builder apt-get install -y git cmake autoconf libtool-bin openjdk-8-jdk-headless wget unzip python bzip2 pkg-config
-# Qt installer dependencies
-docker exec -t builder apt-get install -y libx11-xcb1 libgl1-mesa-glx libglib2.0-0
-# Inject cached 3pp's (if none exists in 3pp dir, we inject zero ones, and all is downloaded in the container)
-# TODO: caching
-#docker cp 3pp builder:/workspace
-docker exec -t builder mkdir -p /workspace/3pp
+# setup build dir on the host, not inside of the container
+mkdir -p ../subsurface-mobile-build-arm
+
+# this uses a custom built Ubuntu image that includes Qt for Android and
+# Android NDK/SDK
+# Running sleep to keep the container running during the build
+PARENT="$( cd .. && pwd )"
+docker run -v $PWD:/android/subsurface \
+ -v $PARENT/subsurface-mobile-build-arm:/android/subsurface-mobile-build-arm \
+ --name=builder \
+ -w /android \
+ -d dirkhh/android-builder:5.11.03 \
+ /bin/sleep 60m
diff --git a/scripts/android/travisbuild.sh b/scripts/android/travisbuild.sh
index 84ce42f6d..6d8397e40 100644
--- a/scripts/android/travisbuild.sh
+++ b/scripts/android/travisbuild.sh
@@ -3,13 +3,9 @@
set -x
set -e
+# by running the build wrapper again we should be able to test newer
+# versions of the dependencies even without updating the docker image
+# (but of course having the right things in place will save a ton of time)
docker exec -e TRAVIS="$TRAVIS" -t builder subsurface/packaging/android/android-build-wrapper.sh
-# Extract the built apk from the builder container
-docker cp builder:/workspace/subsurface-mobile-build-arm/build/outputs/apk/ .
-
-# TODO: Caching
-# Yank Qt, android-sdk, android-ndk and other 3pp source tar balls out from the container and cache them.
-#docker exec builder mkdir -p 3pp
-#docker exec builder sh -c 'mv Qt android-sdk-linux android-ndk-* *.tar.gz *.tar.bz2 3pp/'
-#docker cp builder:/workspace/3pp .
+ls -l ../subsurface-mobile-build-arm/build/outputs/apk/