2014-08-24 15:34:01 +08:00
|
|
|
language: cpp
|
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
2015-05-29 23:52:34 +08:00
|
|
|
- osx
|
2014-08-24 15:34:01 +08:00
|
|
|
|
2016-12-25 21:16:38 +08:00
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
|
|
|
|
2014-08-24 15:34:01 +08:00
|
|
|
compiler:
|
2015-05-29 23:52:34 +08:00
|
|
|
- clang
|
2014-08-24 15:34:01 +08:00
|
|
|
- gcc
|
|
|
|
|
2015-05-29 23:52:34 +08:00
|
|
|
env:
|
|
|
|
- CONFIG=Release
|
|
|
|
- CONFIG=Debug
|
|
|
|
|
2014-08-24 15:34:01 +08:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: change
|
|
|
|
on_failure: always
|
|
|
|
|
|
|
|
install:
|
2015-10-30 01:51:28 +08:00
|
|
|
- git clone https://github.com/HowardHinnant/date
|
2016-04-14 22:41:17 +08:00
|
|
|
- cd date
|
|
|
|
- git checkout tags/v1.0.0
|
|
|
|
- cd ..
|
2016-12-25 21:16:38 +08:00
|
|
|
- g++ --version
|
2016-12-25 21:24:10 +08:00
|
|
|
- cmake --version
|
2015-05-29 23:52:34 +08:00
|
|
|
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
|
|
|
|
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
|
2016-12-25 19:57:20 +08:00
|
|
|
&& sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
|
2016-12-25 20:46:46 +08:00
|
|
|
&& sudo apt-get update
|
2016-12-25 21:08:05 +08:00
|
|
|
&& sudo apt-cache madison cmake
|
2016-12-25 20:38:53 +08:00
|
|
|
&& sudo apt-get install cmake -y
|
2016-12-25 19:57:20 +08:00
|
|
|
;
|
2015-09-14 05:33:16 +08:00
|
|
|
fi
|
2014-08-24 15:34:01 +08:00
|
|
|
|
2015-05-29 23:52:34 +08:00
|
|
|
before_script:
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2016-06-13 02:03:09 +08:00
|
|
|
- if [[ "$CONFIG" = "Debug" && "$TRAVIS_OS_NAME" = "linux" ]]; then
|
|
|
|
cp -r ../scripts/ . &&
|
|
|
|
cp -r ../test_scripts/ . &&
|
|
|
|
sudo apt-get install python-pyparsing;
|
|
|
|
fi
|
2015-09-14 05:33:16 +08:00
|
|
|
- if [[ "$CXX" = "g++" && "$CONFIG" = "Debug" && "$TRAVIS_OS_NAME" = "linux" ]]; then export CXXFLAGS="--coverage"; fi
|
2016-05-05 16:15:26 +08:00
|
|
|
- cmake .. -DCMAKE_BUILD_TYPE=$CONFIG -DCMAKE_PREFIX_PATH=$PWD/../date
|
2014-08-24 15:34:01 +08:00
|
|
|
|
2015-05-29 23:52:34 +08:00
|
|
|
script:
|
|
|
|
- cmake --build . --config $CONFIG
|
|
|
|
- ctest --output-on-failure
|
2015-05-30 05:16:50 +08:00
|
|
|
|
|
|
|
after_script:
|
|
|
|
- ../coveralls
|