Skip to content

Commit

Permalink
Add travis build support for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
morphis committed Jan 27, 2017
1 parent 36d2e8f commit 8e337e3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: cpp
os: linux
sudo: required

services:
- docker

script:
- utils/travis-build.sh
45 changes: 45 additions & 0 deletions utils/travis-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/sh -ex

run_first_stage() {
docker pull ubuntu:16.04
docker run -i -t -v $PWD:/libhybris ubuntu:16.04 /libhybris/utils/travis-build.sh --second-stage
}

run_second_stage() {
# We're now inside the docker container and need to install all
# necassary build dependencies first.
apt-get update -qq
apt-get install -qq -y \
autoconf \
automake \
autopoint \
autotools-dev \
android-headers \
build-essential \
git \
pkg-config \
libgles2-mesa-dev \
libwayland-dev \
libtool

cd /libhybris/hybris

# Cleanup everything
git clean -fdx . || true
git reset --hard || true

./autogen.sh
./configure \
--enable-arch=x86 \
--enable-wayland \
--enable-experimental \
--with-android-headers=/usr/include/android

make -j10
}

if [ "$1" = "" ]; then
run_first_stage
elif [ "$1" = "--second-stage" ]; then
run_second_stage
fi

0 comments on commit 8e337e3

Please sign in to comment.