scripts: add travis build support

This commit is contained in:
Simon Fels 2018-06-08 17:24:42 +02:00
parent f3d77d660c
commit f55cccbe65
3 changed files with 41 additions and 0 deletions

9
.travis.yml Normal file
View File

@ -0,0 +1,9 @@
language: cpp
os: linux
sudo: required
services:
- docker
script:
- scripts/build-with-docker.sh

3
scripts/build-with-docker.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker pull ubuntu:16.04
docker run -i -t -v $PWD:/anbox ubuntu:16.04 /anbox/scripts/clean-build.sh

29
scripts/clean-build.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
set -ex
apt-get update -qq
apt-get install -qq -y \
build-essential \
debhelper \
git
apt-get clean
cd /anbox
cleanup() {
# In cases where anbox comes directly from a checked out Android
# build environment we miss some symlinks which are present on
# the host and don't have a valid git repository in that case.
if [ -d .git ] ; then
git clean -fdx .
git reset --hard
fi
}
cleanup
apt-get install -y build-essential curl devscripts gdebi-core dkms dh-systemd
apt-get install -y $(gdebi --quiet --apt-line ./debian/control)
debuild -us -uc