forked from googleapis/google-cloud-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
187 lines (177 loc) · 5.8 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
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
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
group: travis_latest
sudo: required
language: cpp
# TODO(#19) - this is a skeleton matrix, needs to be designed and completed.
# TODO(#62) - enable a SANITIZE_MEMORY=yes build when we eliminate the false positives
matrix:
include:
- # This is the only macOS entry in the matrix. It is disabled on pull
# requests because Travis often has long backlogs for macOS.
os: osx
osx_image: xcode7.3
compiler: clang
env:
OPENSSL_ROOT_DIR=/usr/local/opt/libressl
install:
- git submodule update --init
- ci/install-retry.sh ci/travis/install-macosx.sh
script: ci/travis/build-macosx.sh
cache: ccache
if: type != pull_request
- # Compile on Travis' native environment with Bazel
os: linux
compiler: gcc
install: ci/install-retry.sh ci/travis/install-bazel.sh
script: ci/travis/build-bazel.sh
- # Compile on Travis' native environment with Bazel
os: linux
compiler: gcc
env:
TEST_BAZEL_AS_DEPENDENCY=yes
install: ci/install-retry.sh ci/travis/install-bazel.sh
script: ci/travis/build-bazel.sh
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
- # Install the google-cloud-cpp libraries and test that one can use the
# installed versions.
os: linux
compiler: clang
env:
TEST_INSTALL=yes
DISTRO=ubuntu-install
DISTRO_VERSION=18.04
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
- # Verify that we can compile shared libraries, and verify that the ABI is
# not changing, or rather, that if there are changes the changes are
# intentional.
os: linux
compiler: gcc
env:
CHECK_ABI=yes
TEST_INSTALL=yes
CMAKE_FLAGS=-DBUILD_SHARED_LIBS=yes
BUILD_TYPE=Debug
DISTRO=ubuntu-install
DISTRO_VERSION=18.04
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
- # Run clang-tidy, clang-format, and generate the documentation.
os: linux
compiler: clang
env:
CMAKE_FLAGS=-DGOOGLE_CLOUD_CPP_CLANG_TIDY=yes
BUILD_TYPE=Debug
DISTRO=ubuntu
DISTRO_VERSION=18.04
- # Build with the AddressSanitizer.
os: linux
compiler: clang
env:
CMAKE_FLAGS=-DSANITIZE_ADDRESS=yes
BUILD_TYPE=Debug
DISTRO=ubuntu
DISTRO_VERSION=18.04
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
- # Build with the UndefinedBehaviorSanitizer.
os: linux
compiler: clang
env:
CMAKE_FLAGS=-DSANITIZE_UNDEFINED=yes
BUILD_TYPE=Debug
DISTRO=ubuntu
DISTRO_VERSION=18.04
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
- # Generate code coverage information and upload to codecov.io.
os: linux
compiler: gcc
env:
BUILD_TYPE=Coverage
DISTRO=ubuntu
DISTRO_VERSION=18.04
- # Compile with tests disabled.
os: linux
compiler: gcc
env:
BUILD_TESTING=no
CHECK_STYLE=yes
GENERATE_DOCS=yes
CMAKE_FLAGS=-DBUILD_TESTING=OFF
DISTRO=ubuntu
DISTRO_VERSION=18.04
- # Compile with exceptions disabled.
os: linux
compiler: gcc
env:
CMAKE_FLAGS=-DGOOGLE_CLOUD_CPP_ENABLE_CXX_EXCEPTIONS=no
DISTRO=ubuntu
DISTRO_VERSION=16.04
- # Compile on Fedora with libc++.
os: linux
compiler: clang
env:
CMAKE_FLAGS=-DBUILD_SHARED_LIBS=ON
DISTRO=fedora
DISTRO_VERSION=29
USE_LIBCXX=yes
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
- # Compile on CentOS.
os: linux
compiler: gcc
env:
DISTRO=centos
DISTRO_VERSION=7
if: repo =~ ^GoogleCloudPlatform/ or head_repo =~ ^GoogleCloudPlatform/
allow_failures:
- # For the moment, allow failures in the ABI check builds.
# TODO(#694) - remove this when the ABI is declared stable.
os: linux
compiler: gcc
env:
CHECK_ABI=yes
TEST_INSTALL=yes
CMAKE_FLAGS=-DBUILD_SHARED_LIBS=yes
BUILD_TYPE=Debug
DISTRO=ubuntu-install
DISTRO_VERSION=18.04
script:
- ci/travis/build-linux.sh
# We do not need to recursively extract the submodules. This saves some time in
# the builds, the default install step then performs a lighter weight module
# initialization than what Travis does by default.
git:
submodules: false
install:
# The git default is to recurse, override it because we do not need to and
# that saves time.
- git submodule update --init
- ci/install-retry.sh ci/travis/install-linux.sh
after_success:
- ci/travis/upload-codecov.sh
- ci/travis/upload-docs.sh
- ci/travis/dump-logs.sh
after_failure:
- ci/travis/dump-logs.sh
cache:
directories:
# Cache the Bazel directories, in builds that do not use Bazel this is
# empty and trivial to cache.
- $HOME/.cache/bazel
- build-output/ccache
timeout: 900
before_cache:
# Do not save the Bazel installation, reinstall each time, it fails to install
# if the installation is in the cache.
- rm -fr ${HOME}/.cache/bazel/_bazel_${USER}/install
notifications:
email: false