Skip to content

Commit

Permalink
travis: Move to the containerized platform
Browse files Browse the repository at this point in the history
  • Loading branch information
thentenaar committed Feb 14, 2016
1 parent c82749e commit be1d7a1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 12 deletions.
19 changes: 19 additions & 0 deletions .travis-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
if [ "$TRAVIS_OS_NAME" == "linux" ]
then
pip install --user cpp-coveralls gcovr
else
brew update
brew install mysql
brew install cunit
fi

# Build libgit2
mkdir -p $HOME/deproot
wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz
tar -xzf v0.23.4.tar.gz
mkdir -p libgit2-build && cd libgit2-build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/deproot --build=. ../libgit2-0.23.4
make && make install
cd .. ; rm -rf libgit2-build libgit2-0.23.4

35 changes: 23 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,47 @@ branches:
- master
- covscan

sudo: false

os:
- linux
- osx

compilers:
- gcc
- clang

matrix:
fast_finish: true
exclude:
- compiler: gcc
os: osx
allow_failures:
- os: osx

install:
- sudo apt-get update -qq
- sudo apt-get install -qq libpq-dev libmysqlclient-dev libsqlite3-dev
- sudo apt-get install -qq libcunit1 libcunit1-dev
- sudo pip install cpp-coveralls gcovr
- wget https://github.com/libgit2/libgit2/archive/v0.23.4.tar.gz
- tar -xzf v0.23.4.tar.gz
- mkdir -p libgit2-build && cd libgit2-build
- cmake --build=. ../libgit2-0.23.4 && make && sudo make install
- cd .. ; rm -rf libgit2-build libgit2-0.23.4
- ./.travis-install.sh

script:
- if [ -z ${COVERITY_SCAN_BRANCH} ] || [ ${COVERITY_SCAN_BRANCH} != 1 ] ; then ./configure && make && make test ; fi
- if [ -z ${COVERITY_SCAN_BRANCH} ] || [ ${COVERITY_SCAN_BRANCH} != 1 ] ; then CPPFLAGS="-isystem $HOME/deproot/include" ./configure --with-libgit2=$HOME/deproot && make && make test ; fi
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then cat config.log ; fi

after_success:
- COVERALLS=1 make clean coverage
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then COVERALLS=1 make clean coverage ; fi

addons:
apt:
packages:
- libpq-dev
- libmysqlclient-dev
- libsqlite3-dev
- libcunit1
- libcunit1-dev
coverity_scan:
project:
name: "thentenaar/mmm"
description: "Minimal Migration Manager"
notification_email: tim@hentenaar.com
build_command_prepend: ./configure
build_command_prepend: ./configure --with-libgit2=$HOME/deproot
build_command: make
branch_pattern: covscan

0 comments on commit be1d7a1

Please sign in to comment.