-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
49 lines (48 loc) · 1.69 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
language: cpp
env:
# GNU C/C++ Build
- CC_OVERLOAD=gcc
CXX_OVERLOAD=g++
# Clang Build+
- CC_OVERLOAD=clang
CXX_OVERLOAD=clang++
# Clang Static Analysis
- SCAN_BUILD=1;
# GCov Coverage Build
- CC_OVERLOAD=gcc
CXX_OVERLOAD=g++
CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON"
COVERAGE=1
before_install:
- git submodule update --init --recursive
- sudo apt-add-repository -y ppa:smspillaz/verapp-latest
- sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install -qq `cat DEPENDENCIES`
- yes | sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
- yes | sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
- yes | sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.8 50
- if [[ $COVERAGE == 1 ]] ; then sudo pip install cpp-coveralls; fi
script:
- mkdir build
- pushd build;
- export CC=${CC_OVERLOAD}
- export CXX=${CXX_OVERLOAD}
- export COMMON_CMAKE_OPTIONS="-DYIQI_BOOST_USE_STATIC_LIBS=OFF -DGMOCK_ALWAYS_DOWNLOAD_SOURCES=ON"
- if [[ $SCAN_BUILD == 1 ]] ; then
scan-build cmake .. `echo ${CMAKE_OPTIONS} ${COMMON_CMAKE_OPTIONS}`;
scan-build --use-cc=clang --use-c++=clang++ make;
else
cmake .. `echo ${CMAKE_OPTIONS} ${COMMON_CMAKE_OPTIONS}`;
make;
fi;
- pushd tests;
- ./unit/yiqi_unit_tests
- ./integration/yiqi_integration_tests
- ./acceptance/yiqi_acceptance_tests
- popd;
- popd;
after_success:
- if [[ $COVERAGE == 1 ]] ; then
coveralls -E "(^.*\/yiqi\/build\/.*$)" -E "(^.*\/yiqi/\sample\/.*$)" -E "(^.*\/yiqi/\imported\/.*$)" -E "(^.*\/yiqi/\include\/.*$)" -E "(^.*\/yiqi\/generators\/.*$)";
fi