0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 04:47:18 +08:00
sqlpp11/.travis.yml
2015-10-29 18:51:28 +01:00

56 lines
1.8 KiB
YAML

language: cpp
os:
- linux
- osx
osx_image: xcode7
compiler:
- clang
- gcc
env:
- CONFIG=Release
- CONFIG=Debug
notifications:
email:
on_success: change
on_failure: always
install:
- CMAKE_VERSION_MM=3.2
- CMAKE_VERSION_FULL=$CMAKE_VERSION_MM.2
- git clone https://github.com/HowardHinnant/date
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
&& sudo add-apt-repository -y ppa:apokluda/boost1.53
&& sudo apt-get update -qq
&& sudo apt-get install -qq g++-4.8 libboost1.53-dev --no-install-recommends
&& sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.6
&& sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.8
&& sudo update-alternatives --quiet --set gcc /usr/bin/gcc-4.8
&& wget http://www.cmake.org/files/v${CMAKE_VERSION_MM}/cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh
&& sudo sh cmake-${CMAKE_VERSION_FULL}-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update
&& ((brew list -1 | grep -q "^$cmake\$") || brew install cmake)
&& (brew outdated cmake || brew upgrade cmake)
&& cmake --version;
fi
before_script:
- mkdir build
- cd build
- if [[ "$CXX" = "g++" && "$CONFIG" = "Debug" && "$TRAVIS_OS_NAME" = "linux" ]]; then export CXXFLAGS="--coverage"; fi
- cmake .. -DCMAKE_BUILD_TYPE=$CONFIG -DDATE_INCLUDE_DIR=$PWD/../date
script:
- cmake --build . --config $CONFIG
- ctest --output-on-failure
after_script:
- ../coveralls