-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (73 loc) · 2.02 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
# Use new trusty images, should yield newer compilers and packages
sudo: true
dist: trusty
language: cpp
matrix:
include:
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9
env:
- COMPILERCXX=g++-4.9
- COMPILERC=gcc-4.9
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- COMPILERCXX=g++-5
- COMPILERC=gcc-5
- compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
env:
- COMPILERCXX=g++-6
- COMPILERC=gcc-6
- compiler: clang
env:
- COMPILERC=clang
- CLANGV=3.8.1
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
- compiler: clang
env:
- COMPILERC=clang
- CLANGV=3.9.1
- RUNCLANGTIDY=TRUE
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-6
before_install:
- sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
- sudo apt-get update -qq
- sudo apt-get install cmake
- mkdir $HOME/clang+llvm
- export PATH=$HOME/clang+llvm/bin:$PATH
- if [ -n "$CLANGV" ]; then wget http://llvm.org/releases/$CLANGV/clang+llvm-$CLANGV-x86_64-linux-gnu-debian8.tar.xz -O $HOME/clang+llvm.tar.xz; fi
- if [ -n "$CLANGV" ]; then tar xf $HOME/clang+llvm.tar.xz -C $HOME/clang+llvm --strip-components 1; fi
script:
- mkdir build
- cd build
- cmake -DCMAKE_CXX_COMPILER=$COMPILERCXX -DCMAKE_C_COMPILER=$COMPILERC -DCMAKE_INSTALL_PREFIX=/tmp/ ..
- if [ -n "$RUNCLANGTIDY" ]; then cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=true ..; fi
- make
- cd ..
- if [ -n "$RUNCLANGTIDY" ]; then git ls-files '*.cpp' | xargs -P 1 -I{} clang-tidy -p build/ -header-filter="^((?\!build).)*$" {}; fi