-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
111 lines (104 loc) · 3.76 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
language: generic # prevent travis from overriding provided compilers.
cache:
ccache: true # includes $HOME/.ccache and adds /usr/lib/ccache to $PATH
# directories:
# - 3rd_party # this is sometimes breaking subsequent Travis builds
dist: trusty
notifications:
email: false
webhooks: https://segs.io/travis/travis-ci.php
env:
global:
# Ubuntu version
- LINUX_DIST=trusty
- DEPS_DIR=${TRAVIS_BUILD_DIR}/deps
# Global build options and C++ flags
- CXX_FLAGS="-Wall -pedantic"
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- CASHER_TIME_OUT=1000
- QT=511
addons_shortcuts:
addons_clang50: &clang50
apt:
sources: [ 'ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
packages: [ 'clang-5.0', 'clang-tidy-5.0' ]
addons_gcc5: &gcc5
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-5', 'gcc-5' ]
addons_gcc6: &gcc6
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-6', 'gcc-6' ]
addons_gcc7: &gcc7
apt:
sources: [ 'ubuntu-toolchain-r-test' ]
packages: [ 'g++-7', 'gcc-7' ]
matrix:
include:
# - os: linux
# compiler: "clang-3.9"
# env: CLANG_VERSION=3.9 BUILD='Debug' CC=clang-3.9 CXX=clang++-3.9 LIBCXX=On
# addons: *clang39
# - os: linux
# compiler: "clang-4.0"
# env: CLANG_VERSION=4.0 BUILD='Debug' CC=clang-4.0 CXX=clang++-4.0 LIBCXX=On
# addons: *clang40
# - os: linux
# compiler: "clang-5.0"
# env: CLANG_VERSION=5.0 BUILD='Debug' CC=clang-5.0 CXX=clang++-5.0 LIBCXX=On
# CLANG_TIDY=clang-tidy-5.0
# addons: *clang50
# - os: linux
# compiler: "clang-5.0"
# env: CLANG_VERSION=5.0 BUILD='Debug' CC=clang-5.0 CXX=clang++-5.0 LIBCXX=On
# CXXFLAGS="-fsanitize=address,undefined,integer -fno-sanitize-recover=all -fno-omit-frame-pointer ${CXXFLAGS}"
# LDFLAGS="-fsanitize=address,undefined,integer"
# addons: *clang50
- os: linux
compiler: "gcc-7"
env: BUILD='Debug' CC=gcc-7 CXX=g++-7
addons: *gcc7
- os: osx
osx_image: xcode9.2
compiler: clang
env: BUILD='Debug'
before_install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository ppa:beineri/opt-qt593-trusty -y; fi
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get update -qq;
else
brew update;
fi
# - if [ -n "$CLANG_VERSION" ]; then sudo PATH="${PATH}" CXX="$CXX" CC="$CC" ./ci_support/install_libcxx.sh; fi
install:
# - |
# if [ "$LIBCXX" == "On" ]; then
# CXX_FLAGS="${CXX_FLAGS} -stdlib=libc++ -nostdinc++ -cxx-isystem /usr/include/c++/v1/ -Wno-unused-command-line-argument";
# CXX_LINKER_FLAGS="${CXX_LINKER_FLAGS} -lc++abi";
# fi
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
sudo apt-get install -qq qt59base qt59declarative qt59websockets qt59quickcontrols2; source /opt/qt59/bin/qt59-env.sh;
CMAKE_OPTS="";
else
brew install cppcheck qt;
brew link --force qt;
export PATH="/usr/local/opt/qt/bin:$PATH" # missing mkspecs fix
QT5_CMAKE_PREFIX=$(ls -d $(brew --cellar)/qt/*/lib/cmake);
CMAKE_OPTS="-DCMAKE_PREFIX_PATH=${QT5_CMAKE_PREFIX}";
fi
export CMAKE_OPTS;
script:
- mkdir build
- cd build
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
cmake .. -DCMAKE_BUILD_TYPE=${BUILD} -DCMAKE_PREFIX_PATH="$(ls -d $(brew --cellar)/qt/*/lib/cmake)" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}" -DBUILD_WITH_CCACHE=1 -DCLANG_TIDY=$(which ${CLANG_TIDY});
else
cmake .. -DCMAKE_BUILD_TYPE=${BUILD} -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" -DCMAKE_EXE_LINKER_FLAGS="${CXX_LINKER_FLAGS}" -DBUILD_WITH_CCACHE=1 -DCLANG_TIDY=$(which ${CLANG_TIDY});
fi
- make VERBOSE=1
# ctest --output-on-failure