2015-11-21 10:30:32 +08:00
|
|
|
# from: https://github.com/nlohmann/json/blob/master/.travis.yml
|
|
|
|
|
2015-10-27 04:47:36 +08:00
|
|
|
language: cpp
|
2015-11-21 10:30:32 +08:00
|
|
|
|
2016-06-12 03:29:15 +08:00
|
|
|
sudo: required
|
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
notifications:
|
|
|
|
email: false
|
2015-11-21 10:30:32 +08:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
2016-06-12 03:29:15 +08:00
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
- george-edison55/cmake-3.x
|
|
|
|
packages:
|
|
|
|
- g++-4.9
|
|
|
|
- valgrind
|
|
|
|
- python-pip
|
2015-11-21 10:30:32 +08:00
|
|
|
before_script:
|
|
|
|
- pip install --user git+git://github.com/eddyxu/cpp-coveralls.git
|
2016-06-12 03:29:15 +08:00
|
|
|
env:
|
|
|
|
- COMPILER=g++-4.9
|
2015-11-21 10:30:32 +08:00
|
|
|
|
|
|
|
- os: linux
|
|
|
|
compiler: gcc
|
|
|
|
addons:
|
|
|
|
apt:
|
2016-06-12 03:29:15 +08:00
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-5
|
|
|
|
- valgrind
|
|
|
|
env:
|
|
|
|
- COMPILER=g++-5
|
2015-11-21 10:30:32 +08:00
|
|
|
|
2015-10-27 03:57:37 +08:00
|
|
|
script:
|
2016-06-12 03:29:15 +08:00
|
|
|
- cmake --version
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
- cmake -D SHARED=1 -D STATIC=0 -D TESTS=1 -D CMAKE_CXX_COMPILER=$COMPILER ..
|
|
|
|
- cmake --build . --target xlnt.test
|
2016-01-17 13:33:15 +08:00
|
|
|
- bin/xlnt.test
|
2015-11-21 10:30:32 +08:00
|
|
|
|
|
|
|
after_success:
|
2016-06-13 11:06:43 +08:00
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90 ; fi
|
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90 ; fi
|
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 90 ; fi
|
2016-06-14 11:36:26 +08:00
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then rm -rf ./* ; fi
|
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then cmake -G "Unix Makefiles" -D DEBUG=1 -D COVERAGE=1 -D SHARED=0 -D STATIC=1 -D TESTS=1 .. ; fi
|
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then make VERBOSE=1 ; fi
|
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then cd .. && ./build/bin/xlnt.test ; fi
|
2016-06-13 11:06:43 +08:00
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then export OLDWD=$(pwd) ; fi
|
2016-06-14 11:36:26 +08:00
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then cd "build/CMakeFiles/xlnt.static.dir$(pwd)" ; pwd ; fi
|
2016-07-10 03:12:53 +08:00
|
|
|
- if [ "$COMPILER" = "g++-4.9" ]; then coveralls --root $OLDWD --verbose -x ".cpp" --gcov-options '\-p' --exclude include --exclude third-party --exclude tests --exclude samples --exclude benchmarks -E ".*/source/.*/tests/.*" -E ".*/build/tests/runner-autogen.cpp.*" -E ".*CompilerIdCXX/.*" ; fi
|