Merge pull request #25 from morphis/feature/travis-support

Add initial travis build configuration
This commit is contained in:
Simon Fels 2017-01-20 11:26:05 +01:00 committed by GitHub
commit dfe913412e
3 changed files with 61 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

49
scripts/clean-build.sh Executable file
View file

@ -0,0 +1,49 @@
#!/bin/sh
set -ex
apt-get update -qq
apt-get install -qq -y \
build-essential \
cmake \
cmake-data \
debhelper \
dbus \
git \
google-mock \
libboost-dev \
libboost-filesystem-dev \
libboost-log-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
libcap-dev \
libdbus-1-dev \
libdbus-cpp-dev \
libegl1-mesa-dev \
libgles2-mesa-dev \
libglib2.0-dev \
libglm-dev \
libgtest-dev \
liblxc1 \
libprotobuf-dev \
libsdl2-dev \
lxc-dev \
pkg-config \
protobuf-compiler
cd /anbox
# 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.
git clean -fdx . || true
git reset --hard || true
mkdir build || rm -rf build/*
cd build
cmake ..
make -j10
make test