forked from CppMicroServices/CppMicroServices
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
187 lines (162 loc) · 6.63 KB
/
.travis.yml
File metadata and controls
187 lines (162 loc) · 6.63 KB
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
sudo: false
language: cpp
env:
global:
- PATH=$HOME/cache/bin/:$PATH
- BUILD_DIR=/tmp/cppmicroservices_builds
- BUILD_CONFIGURATION=0
- secure: "g2dT1rLVDXAR7uFkhgKlm7rUqCPHwl+o4CFSqEo5w9H/M5xuuQLP597J8qwhgkWutJABM4G4zLF9yzb5rTbUH1BSdGTzmdUkvJGvLOFq09xwLQP5PAKlq6s1dpVr7J9Ciy49cEVDD2leaikMf9zK3ty9Fv5F2mL3Itd6a/U5M5o="
# We do not test all build configurations with all compiler / platform
# combinations. For now, just the latest compilers being tested will
# run all build configurations.
matrix:
include:
# Test our minimum GCC version, which is gcc 5.4 on Ubuntu Trusty
- os: linux
addons: { apt: { packages: ["valgrind", "gcc-5", "g++-5"], sources: ["ubuntu-toolchain-r-test"] } }
env: MY_CC=gcc-5 MY_CXX=g++-5
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
# Test our minimum Clang version, which is clang 3.5 on Ubuntu Trusty
- os: linux
dist: trusty
compiler: clang
addons: { apt: { packages: ["valgrind", "clang-3.5", "libc++-dev", "libc++abi-dev", "g++-4.9"], sources: ["ubuntu-toolchain-r-test", llvm-toolchain-trusty-3.5] } }
# Travis puts /usr/local/clang-5.0.0/bin in front of the path, so we have to "fix" that
env: MY_CC=clang-3.5 MY_CXX=clang++-3.5 PATH=/usr/local/bin:/usr/bin:$PATH
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
# Test one build configuration with the latest available Clang
- os: linux
dist: xenial
compiler: clang
addons: { apt: { packages: ["valgrind", "libc++-dev", "libc++abi-dev"], sources: ["ubuntu-toolchain-r-test"] } }
env: MY_CC=clang MY_CXX=clang++ PATH=/usr/bin:$PATH
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
# Test all build configuration with the latest available GCC
- os: linux
addons: &gcc8-valgrind { apt: { packages: ["valgrind", "gcc-8", "g++-8"], sources: ["ubuntu-toolchain-r-test"] } }
env: MY_CC=gcc-8 MY_CXX=g++-8 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
- os: linux
addons: *gcc8-valgrind
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=1 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
- os: linux
addons: *gcc8-valgrind
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=2 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
- os: linux
addons: *gcc8-valgrind
env: MY_CC=gcc-8 MY_CXX=g++-8 BUILD_CONFIGURATION=3 WITH_COVERAGE=1 MY_COVERAGE=gcov-8
before_install:
# Install a newer version of valgrind
- ./install_valgrind.sh
# minimum supported compiler on OS X
- os: osx
osx_image: xcode7.3
compiler: clang
env: MACOSX_DEPLOYMENT_TARGET=10.11
- os: osx
osx_image: xcode7.3
compiler: clang
env: BUILD_CONFIGURATION=1 MACOSX_DEPLOYMENT_TARGET=10.11
# latest compiler on OS X
- os: osx
osx_image: xcode11.6
compiler: clang
env: BUILD_CONFIGURATION=0 MACOSX_DEPLOYMENT_TARGET=10.15
- os: osx
osx_image: xcode11.6
compiler: clang
env: BUILD_CONFIGURATION=1 MACOSX_DEPLOYMENT_TARGET=10.15
- os: osx
osx_image: xcode11.6
compiler: clang
env: BUILD_CONFIGURATION=2 MACOSX_DEPLOYMENT_TARGET=10.15
- os: osx
osx_image: xcode11.6
compiler: clang
env: BUILD_CONFIGURATION=3 MACOSX_DEPLOYMENT_TARGET=10.15
# To generate codecov reports
# pin xcode version back to 10.3 since 11.6 appears to break code coverage
- os: osx
osx_image: xcode10.3
compiler: clang
env: BUILD_CONFIGURATION=0 MACOSX_DEPLOYMENT_TARGET=10.14 WITH_COVERAGE=1
cache:
directories:
- $HOME/cache
branches:
except:
- gh_pages
addons:
coverity_scan:
project:
name: CppMicroServices/CppMicroServices
description: "Build submitted via Travis CI"
notification_email: sascha.zelzer@gmail.com
build_command_prepend: "mkdir us-cov; cd us-cov; cmake -DCMAKE_BUILD_TYPE:STRING=Release -DUS_BUILD_EXAMPLES:BOOL=ON -DUS_BUILD_TESTING:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON ../"
build_command: "make -j 4"
branch_pattern: coverity_scan
# the install step will take care of deploying a newer cmake version
install:
# Set up some variables
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
CMAKE_OS="Linux";
else
CMAKE_OS="Darwin";
fi
- CMAKE_VER_DIR="v3.13"
- CMAKE_VER="3.13.2"
- CMAKE_DIR="cmake-${CMAKE_VER}-${CMAKE_OS}-x86_64"
- CMAKE_FILE="${CMAKE_DIR}.tar.gz"
- CMAKE_SHA_FILE="cmake-${CMAKE_VER}-SHA-256.txt"
- CMAKE_INSTALL_DIR="${TRAVIS_BUILD_DIR}/deps"
- echo "CMAKE_OS=${CMAKE_OS}"
- echo "CMAKE_VER_DIR=${CMAKE_VER_DIR}"
- echo "CMAKE_VER=${CMAKE_VER}"
- echo "CMAKE_DIR=${CMAKE_DIR}"
- echo "CMAKE_FILE=${CMAKE_FILE}"
- echo "CMAKE_SHA_FILE=${CMAKE_SHA_FILE}"
- echo "CMAKE_INSTALL_DIR=${CMAKE_INSTALL_DIR}"
# Create a directory for the CMake binaries
- mkdir ${CMAKE_INSTALL_DIR} && pushd ${CMAKE_INSTALL_DIR}
# we use curl to fetch the cmake binaries
- travis_retry curl -O "https://cmake.org/files/${CMAKE_VER_DIR}/${CMAKE_FILE}"
- travis_retry curl -O "https://cmake.org/files/${CMAKE_VER_DIR}/${CMAKE_SHA_FILE}"
# Check to make sure we got what we expected
- grep "${CMAKE_FILE}" ${CMAKE_SHA_FILE} | shasum -c -s
# Unpack the cmake distribution
- tar -xf "${CMAKE_FILE}"
- if [[ "$TRAVIS_OS_NAME" == "linux" ]];
then
mv "${CMAKE_DIR}" cmake-install;
else
mv "${CMAKE_DIR}/CMake.app/Contents" cmake-install;
fi
# add both the top-level directory and the bin directory from the archive
# to the system PATH. By adding it to the front of the path we hide the
# preinstalled CMake with our own.
- PATH=${CMAKE_INSTALL_DIR}/cmake-install:${CMAKE_INSTALL_DIR}/cmake-install/bin:$PATH
- echo "PATH=${PATH}"
# don't forget to switch back to the main build directory once you are done
- popd
- export CC=$MY_CC CXX=$MY_CXX
- cmake --version
script:
- test $TRAVIS_BRANCH != coverity_scan || exit 0
- if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ctest -VV -S ./cmake/usCTestScript_travis.cmake ; fi
after_success:
- bash <(curl -s https://codecov.io/bash) -X gcov -s "/tmp/cppmicroservices_builds"