This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
/
.travis.yml
132 lines (123 loc) · 4.3 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
## ---------------------------------------------------------------------
##
## Copyright (C) 2016-17 by the lazyten authors
##
## This file is part of lazyten.
##
## lazyten is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published
## by the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## lazyten is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with lazyten. If not, see <http://www.gnu.org/licenses/>.
##
## ---------------------------------------------------------------------
language: cpp
sudo: required
dist: trusty
branches:
except:
- dev
- /^dev-.*$/
- /^dev_.*$/
env:
global:
# Use two cores for the build
- CORES=2
#
# Use a known-to-work rapidcheck seed
- RC_PARAMS="seed=16920708173099178154 verbose_progress=1 noshrink=1"
#
# The regex for tests to run (disable running tests by TESTS=0)
- TESTS=1 TESTS_REGEX="lazyten_tests_"
addons:
apt:
sources:
- ubuntu-toolchain-r-test # libstdc++-4.9-dev (gcc 4.8's libstdc++ is buggy)
- llvm-toolchain-trusty-5.0 # clang-5.0
packages:
- python3-pip
- ninja-build
#
- libarmadillo-dev
- libboost-dev
- liblapack-dev
- libblas-dev
before_install:
# Note: Using pip, i.e. python2 is on purpose, becase there were problems
# with python3
- travis_retry pip install --user cpp-coveralls
matrix:
include:
# Clang 3.5 with disabled c++14 support with libstdc++-4.9
- install:
- travis_retry sudo apt-get install -y libstdc++-4.9-dev
- export EXTRA_OPTS="-DDRB_MAXIMUM_CXX_STANDARD=11"
- export GCOV="llvm-cov gcov"
compiler: clang
env: CC_COMP="clang" CXX_COMP="clang++"
#
# Clang 5.0 (has c++17) with libc++-1
# Note that c++17 is disabled due to cmake < 3.8 where c++17 is not yet ready
- install:
- travis_retry sudo apt-get install -y clang-5.0 libc++-dev
- export GCOV="llvm-cov-5.0 gcov"
compiler: clang
env: CC_COMP="clang-5.0" CXX_COMP="clang++-5.0"
#
# gcc-4.8 (c++11 and without tests, since rapidcheck does not compile like this)
- install:
- export TESTS=0 EXTRA_OPTS="-DLAZYTEN_ENABLE_TESTS=OFF"
compiler: gcc
env: CC_COMP="gcc" CXX_COMP="g++"
#
# gcc-7 (with tests and c++17)
# Note that c++17 is disabled due to cmake < 3.8 where c++17 is not yet ready
- install:
- travis_retry sudo apt-get install -y g++-7
- export GCOV="gcov-7"
compiler: gcc
env: CC_COMP="gcc-7" CXX_COMP="g++-7"
#
# Clang-tidy 5.0
- install:
- travis_retry sudo apt-get install -y clang-5.0 libc++-dev clang-tidy-5.0
# Install yaml for the python scripts generated by SetupClangTargets.cmake
- travis_retry pip3 install --user pyyaml
- export BUILD_TARGET="clang-tidy-lazyten"
- export TESTS=0
compiler: clang
env: CC_COMP="clang-5.0" CXX_COMP="clang++-5.0" BUILD_TARGET="clang-tidy-lazyten"
allow_failures:
- env: CC_COMP="clang-5.0" CXX_COMP="clang++-5.0" BUILD_TARGET="clang-tidy-lazyten"
script:
- cmake --version
- ninja --version
- mkdir ${TRAVIS_BUILD_DIR}/build && cd ${TRAVIS_BUILD_DIR}/build
- cmake -DCMAKE_CXX_COMPILER=${CXX_COMP} -DCMAKE_C_COMPILER=${CC_COMP}
-DCMAKE_BUILD_TYPE=DebugRelease ${EXTRA_OPTS}
-DDRB_COVERAGE_Debug=ON
-DAUTOCHECKOUT_MISSING_REPOS=ON
-DRC_ENABLE_TESTS=OFF
-DKRIMS_ENABLE_TESTS=OFF -DKRIMS_ENABLE_EXAMPLES=OFF
-GNinja ..
- cmake --build . --target ${BUILD_TARGET:-all} -- -j ${CORES}
- if [ "${TESTS}" != "0" ]; then
ctest -j ${CORES} --output-on-failure -R "${TESTS_REGEX}"
;else true; fi
after_success:
- cd ${TRAVIS_BUILD_DIR}
- if [ "${GCOV}" ]; then coveralls --gcov "$GCOV" --gcov-options '\-lp'
--root ${PWD} --build-root ${PWD}/build
--include src
;fi
after_failure:
- cd ${TRAVIS_BUILD_DIR}/build
- cat CMakeCache.txt
- cat CMakeFiles/CMakeError.log