-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
115 lines (96 loc) · 3.55 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
language: cpp
os: linux
dist: xenial
addons:
apt:
sources: &apt_sources
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
- llvm-toolchain-xenial-8
- sourceline: 'deb https://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
packages:
- mesa-common-dev
- libgl1-mesa-dev
env:
global: STATIC_ANALYSIS=false
jobs:
include:
##############
# GCC BUILDS #
# ver: 8-9 #
##############
- addons: &gcc8
apt:
sources: *apt_sources
packages: ["g++-8", "xorg-dev", "libgl1-mesa-dev"]
env: COMPILER_CXX=g++-8 COMPILER_C=gcc-8
script: bash ./build.sh
- addons: &gcc9
apt:
sources: *apt_sources
packages: ["g++-9", "xorg-dev", "libgl1-mesa-dev"]
env: COMPILER_CXX=g++-9 COMPILER_C=gcc-9
script: bash ./build.sh
################
# CLANG BUILDS #
# ver: 7-9 #
################
- addons: &clang7
apt:
sources: *apt_sources
packages: ["clang-7", "g++-8", "libc++-7-dev", "libc++abi-7-dev", "libstdc++-7-dev", "xorg-dev", "libgl1-mesa-dev"]
env: COMPILER_CXX=clang++-7 COMPILER_C=clang-7
script: bash ./build.sh
- addons: &clang8
apt:
sources: *apt_sources
packages: ["clang-8", "g++-8", "libc++-8-dev", "libc++abi-8-dev", "libstdc++-8-dev", "xorg-dev", "libgl1-mesa-dev"]
env: COMPILER_CXX=clang++-8 COMPILER_C=clang-8
script: bash ./build.sh
- addons: &clang9
apt:
sources: *apt_sources
packages: ["clang-9", "g++-9", "libc++-9-dev", "libc++abi-9-dev", "libstdc++-9-dev", "xorg-dev", "libgl1-mesa-dev"]
env: COMPILER_CXX=clang++-9 COMPILER_C=clang-9
script: bash ./build.sh
##############
# Misc Tasks #
##############
- addons: &static_analysis
apt:
sources: *apt_sources
packages: ["clang-9", "clang-tidy-9", "g++-9", "g++-9-multilib", "libc6-dbg", "libc6-dbg:i386", "linux-libc-dev", "linux-libc-dev:i386", "libc++-9-dev", "libc++abi-9-dev", "libstdc++-9-dev", "xorg-dev", "libgl1-mesa-dev"]
update: true
env: COMPILER_CXX=clang++-9 COMPILER_C=clang-9 STATIC_ANALYSIS=true
script:
- export ASAN_SYMBOLIZER_PATH=$(which llvm-symbolizer) ASAN_OPTIONS=symbolize=1
- bash ./staticAnalysis.sh
install:
# Export Environment Variables
- export CXX="${COMPILER_CXX}"
- export CC="${COMPILER_C}"
# Install Dependencies
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
- |
if [[ "${STATIC_ANALYSIS}" = "true" ]]; then
# Download OCLint
curl -OL https://github.com/oclint/oclint/releases/download/v0.13.1/oclint-0.13.1-x86_64-linux-4.4.0-112-generic.tar.gz
mkdir -p ~/oclint
tar xf oclint-0.13.1-x86_64-linux-4.4.0-112-generic.tar.gz -C ~/oclint --strip-components=1
rm oclint-0.13.1-x86_64-linux-4.4.0-112-generic.tar.gz
export OCLINT_HOME="$HOME/oclint"
export PATH="$OCLINT_HOME/bin:$PATH"
oclint -version
# Download latest cppcheck
wget https://github.com/danmar/cppcheck/archive/1.90.tar.gz && tar xzvf 1.90.tar.gz && cd cppcheck-1.90
sudo make MATCHCOMPILER=yes FILESDIR=/usr/share/cppcheck HAVE_RULES=yes install && cd ..
cppcheck --version
fi
- cd ${TRAVIS_BUILD_DIR}
before_script:
- cmake --version
- cmake ${CMAKE_OPTIONS_GLOBAL} ${CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_C_COMPILER=${CC} . || exit 1
notifications:
email: false