-
Notifications
You must be signed in to change notification settings - Fork 172
/
.travis.yml
85 lines (77 loc) · 2.39 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
language: cpp
sudo: false
cache: ccache
matrix:
include:
# GCC 4.9
- addons: &gcc49
apt:
sources:
- george-edison55-precise-backports
- ubuntu-toolchain-r-test
packages:
- cmake
- cmake-data
- ninja-build
- g++-4.9
- ccache
compiler: gcc
env: COMPILER_VERSION=4.9 BUILD_TYPE=Release
- addons: *gcc49
compiler: gcc
env: COMPILER_VERSION=4.9 BUILD_TYPE=Debug
# Clang 3.5
- addons: &clang35
apt:
sources:
- george-edison55-precise-backports
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
packages:
- cmake
- cmake-data
- ninja-build
- g++-4.9
- clang-3.5
- ccache
compiler: clang
env: COMPILER_VERSION=3.5 BUILD_TYPE=Release
- addons: *clang35
compiler: clang
env: COMPILER_VERSION=3.5 BUILD_TYPE=Debug
# Clang 3.7
- addons: &clang37
apt:
sources:
- george-edison55-precise-backports
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
packages:
- cmake
- cmake-data
- ninja-build
- g++-4.9
- clang-3.7
- ccache
compiler: clang
env: COMPILER_VERSION=3.7 BUILD_TYPE=Release
- addons: *clang37
compiler: clang
env: COMPILER_VERSION=3.7 BUILD_TYPE=Debug
script:
- mkdir build && cd build
- export CC="${CC}-${COMPILER_VERSION}"
- export CXX="${CXX}-${COMPILER_VERSION}"
- ls -l /usr/lib/ccache
# not all compilers get symlinked in ccache's default directory and we don't have sudo access,
# so use home dir to make ccache symlinks.
- mkdir -p ${HOME}/bin
- export PATH="${HOME}/bin:${PATH}"
- ln -sf /usr/bin/ccache ${HOME}/bin/"${CXX}"
- which ${CXX}
- cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DRC_ENABLE_TESTS=ON -DRC_ENABLE_EXAMPLES=ON -DRC_ENABLE_GTEST=ON -DRC_ENABLE_GMOCK=ON -DRC_ENABLE_BOOST=ON -DRC_ENABLE_BOOST_TEST=ON -DRC_ENABLE_RTTI=ON -G Ninja ..
- ccache --show-stats > ccache_before # collect stats
- ninja -j1 # Don't run out of memory, please
- ccache --show-stats > ccache_after
- diff -U100 ccache_before ccache_after || true # display stats, don't care about result
- ctest --output-on-failure