-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
154 lines (145 loc) · 5.24 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
sudo: required
dist: xenial
services:
- xvfb
language: cpp
branches:
only:
- master
- next
matrix:
include:
- os: osx
env: CONFIGS="Debug Release" GENERATORS="Makefiles Ninja" COMPILERS="Clang"
- os: osx
env: CONFIGS="Debug_And_Release" GENERATORS="Xcode" COMPILERS="Clang"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Makefiles Ninja" COMPILERS="GNU Clang" PPA_INFIX="-5.12.3" QT_VERSION_MM="512"
addons:
apt:
packages: clang
- os: linux
env: CONFIGS="RelWithDebInfo" GENERATORS="Ninja" COMPILERS="Clang" MEMCHECK=true PPA_INFIX="-5.12.3" QT_VERSION_MM="512"
addons:
apt:
packages: valgrind clang
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="563" QT_VERSION_MM="56"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="571" QT_VERSION_MM="57"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="58" QT_VERSION_MM="58"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="596" QT_VERSION_MM="59"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="-5.10.1" QT_VERSION_MM="510"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="-5.11.3" QT_VERSION_MM="511"
- os: linux
env: CONFIGS="Debug Release" GENERATORS="Ninja" COMPILERS="GNU" PPA_INFIX="-5.12.3" QT_VERSION_MM="512"
- os: linux
env: CONFIGS="Coverage" GENERATORS="Makefiles" COMPILERS="GNU" PPA_INFIX="-5.12.3" QT_VERSION_MM="512"
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
export CMAKE_PREFIX_PATH=/opt/qt${QT_VERSION_MM}
&& sudo apt-add-repository --yes ppa:beineri/opt-qt${PPA_INFIX}-xenial
&& sudo apt-get update -qq
&& sudo apt-get install -qq qtbase5-dev qtdeclarative5-dev qttools5-dev qt${QT_VERSION_MM}base qt${QT_VERSION_MM}script qt${QT_VERSION_MM}tools ninja-build clang lcov cmake
;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew update;
brew outdated cmake || brew upgrade cmake;
brew install qt5;
brew install ninja;
export CMAKE_PREFIX_PATH=$(brew --prefix qt5);
fi
before_script:
- for generator in $GENERATORS;
do
for compiler in $COMPILERS;
do
for config in $CONFIGS;
do
if [ "$generator" = "Makefiles" ];
then
export generator_name="Unix Makefiles";
else
export generator_name=$generator;
fi;
if [ "$compiler" = "GNU" ];
then
export compiler_name="g++";
else
export compiler_name="clang++";
fi;
if [ "$config" = "Debug_And_Release" ];
then
export config_arg=;
else
export config_arg="-DCMAKE_BUILD_TYPE=$config";
fi;
mkdir build-$config-$generator-$compiler;
pushd build-$config-$generator-$compiler;
cmake .. $config_arg -G "$generator_name" -DCMAKE_CXX_COMPILER=$compiler_name && popd && continue;
popd;
failure=1;
break;
done;
if [ "$failure" != "" ]; then break; fi;
done;
if [ "$failure" != "" ]; then break; fi;
done;
if [ "$failure" != "" ]; then false; fi;
script:
- if [ -n "MEMCHECK" ]; then export MEMCHECK_ARG="-DExperimentalMemCheck"; fi
- for config in $CONFIGS;
do
for generator in $GENERATORS;
do
for compiler in $COMPILERS;
do
if [ "$config" = "Debug_And_Release" ];
then
build_configs="Debug Release";
else
build_configs=$config;
fi;
for build_config in $build_configs;
do
pushd build-$config-$generator-$compiler;
cmake --build . --config $build_config;
if [ "$config" = "Coverage" ];
then
cmake --build . --target coverage 2>&1 | sed '/numeric in numeric gt/d';
pip install --user codecov;
codecov -X gcov fix --file=test_all.info;
popd && continue;
else
ctest --output-on-failure && popd && continue;
fi;
popd;
failure=1;
break;
done;
if [ "$failure" != "" ]; then break; fi;
done;
if [ "$failure" != "" ]; then break; fi;
done;
if [ "$failure" != "" ]; then break; fi;
done;
if [ "$failure" != "" ]; then false; fi;
#cmake --build . --target ExperimentalSubmit
#cmake --build . --config $build_config
#ctest --output-on-failure $MEMCHECK_ARG
#cmake --build . --target ExperimentalStart;
#cmake --build . --target ExperimentalConfigure;
#cmake --build . --target ExperimentalBuild;
#cmake --build . --target install;
#cmake --build . --target ExperimentalTest;
#if [ "$MEMCHECK" = "true" ];
#then
#cmake --build . --target ExperimentalMemCheck;
#fi;
notifications:
email: false