summaryrefslogtreecommitdiffstats
path: root/scripts/android/before_install.sh
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2017-02-06 08:06:55 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-11-16 10:23:00 -0800
commit063aadd166db883d9195ca88bf0b74f8675c8d86 (patch)
tree83467f848c7f275309b368e6cddc79467af8a615 /scripts/android/before_install.sh
parentc92a86f89832c5face68b94902dbd119a3b10860 (diff)
downloadsubsurface-063aadd166db883d9195ca88bf0b74f8675c8d86.tar.gz
android: Add android build on travis-ci
This adds a android-apk-build which runs on travis-ci. This is using a quite ugly trick, building in a docker container, basically just to get a newer cmake. The cmake in trusty is way to old to work with android builds. A good side-effect is that this is a complete copy-paste for anyone who would like to build android-binaries them self on Linux. All the uglyness is hidden away in a docker container. Signed-off-by: Anton Lundin <glance@acc.umu.se>
Diffstat (limited to 'scripts/android/before_install.sh')
-rw-r--r--scripts/android/before_install.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/android/before_install.sh b/scripts/android/before_install.sh
new file mode 100644
index 000000000..000d1a760
--- /dev/null
+++ b/scripts/android/before_install.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# Travis only pulls shallow repos. But that messes with git describe.
+# Sorry Travis, fetching the whole thing and the tags as well...
+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 /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 ant 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