Skip to content

Add Travis CI configuration file (linux, gcc/clang) #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 27, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
language:
- cpp

compiler:
- clang
- gcc

env:
- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Release"
- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Release"
- BUILD_SHARED_LIBS="ON" CMAKE_BUILD_TYPE="Debug"
- BUILD_SHARED_LIBS="OFF" CMAKE_BUILD_TYPE="Debug"

before_install:
- sudo add-apt-repository ppa:apokluda/boost1.53 --yes
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test --yes # libstdc++-4.8
- if [ "${CXX}" == "clang++" ]; then sudo add-apt-repository --yes ppa:h-rayflood/llvm; fi # clang++-3.2
- sudo apt-get update

install:
- if [ "${CXX}" == "clang++" ]; then sudo apt-get -qq install clang-3.2; fi
- sudo apt-get install g++-4.8; # clang need it for libstdc++ update
- sudo apt-get install libboost-system1.53-dev
- sudo apt-get install libboost-filesystem1.53-dev
# install gtest workaround
- sudo apt-get install libgtest-dev
- cd /usr/src/gtest
- sudo cmake .
- sudo make
- sudo mv libgtest* /usr/lib
- cd "${TRAVIS_BUILD_DIR}"
# -- end workaround

before_script:
# update compilers
- if [ "${CXX}" == "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi
- if [ "${CXX}" == "clang++" ]; then export CXX="clang++-3.2" CC="clang-3.2"; fi

script:
- mkdir _builds
- cd _builds
# Note: clang not support libc++
- cmake -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} -DCPP-NETLIB_DISABLE_LIBCXX=YES ..
- make
- ctest