Skip to content

Commit

Permalink
Run tests on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Sep 23, 2016
1 parent 0073fef commit 5c3c01b
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Expand Up @@ -4,6 +4,8 @@ language: cpp

matrix:
include:
- os: linux
env: JOB=test ENV=linux
- os: linux
env: JOB=deploy ENV=linux
# - os: linux
Expand All @@ -17,8 +19,9 @@ matrix:
# - os: osx
# env: JOB=deploy ENV=osx

install: .travis/phase $JOB $ENV install
script: .travis/phase $JOB $ENV script
install: .travis/phase $JOB $ENV install
script: .travis/phase $JOB $ENV script
after_script: .travis/phase $JOB $ENV after_script

branches:
only:
Expand Down
4 changes: 4 additions & 0 deletions .travis/build-script
@@ -0,0 +1,4 @@
#!/bin/sh

RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install
RUN $MAKE -C $BUILD_DIR -j$NPROC -k install
Empty file modified .travis/deploy-install 100644 → 100755
Empty file.
4 changes: 1 addition & 3 deletions .travis/deploy-script 100644 → 100755
@@ -1,6 +1,4 @@
#!/bin/sh

RUN $CMAKE -B$BUILD_DIR -H. -DCMAKE_INSTALL_PREFIX:PATH=$CURDIR/_install
RUN $MAKE -C $BUILD_DIR -j$NPROC -k install

. $THIS_DIR/build-script
$THIS_DIR/git-deploy
2 changes: 1 addition & 1 deletion .travis/linux-install
Expand Up @@ -7,7 +7,7 @@ sudo add-apt-repository -y ppa:chris-lea/libsodium

sudo apt-get update -qq

sudo apt-get install -y \
sudo apt-get install -y --force-yes \
ffmpeg \
libgtk2.0-dev \
libopenal-dev \
Expand Down
8 changes: 8 additions & 0 deletions .travis/test-after_script
@@ -0,0 +1,8 @@
#!/bin/sh

# We only submit coverage from the Linux build.
coveralls \
--exclude auto_tests \
--exclude other \
--exclude testing \
--gcov-options '\-lp'
6 changes: 6 additions & 0 deletions .travis/test-install
@@ -0,0 +1,6 @@
#!/bin/sh

# Install cpp-coveralls to upload test coverage results.
pip install --user cpp-coveralls

. $THIS_DIR/deploy-install
13 changes: 13 additions & 0 deletions .travis/test-script
@@ -0,0 +1,13 @@
#!/bin/sh

export CFLAGS="-fprofile-arcs -ftest-coverage"
export CXXFLAGS="-fprofile-arcs -ftest-coverage"
export LDFLAGS="-lgcov --coverage"

export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start

. $THIS_DIR/build-script

export CTEST_OUTPUT_ON_FAILURE=1
RUN $MAKE -C $BUILD_DIR -j$NPROC -k test

0 comments on commit 5c3c01b

Please sign in to comment.