aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorCarlos O'Ryan <coryan@users.noreply.github.com>2017-12-08 20:59:07 -0500
committerCarlos O'Ryan <coryan@users.noreply.github.com>2017-12-08 20:59:07 -0500
commitbc3320b7f1daab522685c67d79b47fd0baddb95c (patch)
treefec9d5297e9626133d05312a7a8b42fcf47141e5 /.travis.yml
parentcc372a071bb417c83cd5dbca008bda1c438af4d5 (diff)
downloadgoogletest-bc3320b7f1daab522685c67d79b47fd0baddb95c.tar.gz
googletest-bc3320b7f1daab522685c67d79b47fd0baddb95c.tar.bz2
googletest-bc3320b7f1daab522685c67d79b47fd0baddb95c.zip
Implement bazel-based builds in Travis.
This refactored test build scripts to enable bazel-build scripts in Travis.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml83
1 files changed, 54 insertions, 29 deletions
diff --git a/.travis.yml b/.travis.yml
index 797c2898..4afad4ae 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,19 +3,60 @@
# This file can be validated on:
# http://lint.travis-ci.org/
+sudo: false
+language: cpp
+
+# Define the matrix explicitly, manually expanding the combinations of (os, compiler, env).
+# It is more tedious, but grants us far more flexibility.
+matrix:
+ include:
+ - os: linux
+ compiler: gcc
+ sudo: true
+ cache:
+ install: ./ci/install-linux.sh && ./ci/log-config.sh
+ script: ./ci/build-linux-bazel.sh
+ - os: linux
+ compiler: clang
+ sudo: true
+ cache:
+ install: ./ci/install-linux.sh && ./ci/log-config.sh
+ script: ./ci/build-linux-bazel.sh
+ - os: linux
+ compiler: gcc
+ env: BUILD_TYPE=Debug VERBOSE=1
+ - os: linux
+ compiler: gcc
+ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
+ - os: linux
+ compiler: clang
+ env: BUILD_TYPE=Debug VERBOSE=1
+ - os: linux
+ compiler: clang
+ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
+ - os: osx
+ compiler: gcc
+ env: BUILD_TYPE=Debug VERBOSE=1
+ - os: osx
+ compiler: gcc
+ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
+ - os: osx
+ compiler: clang
+ env: BUILD_TYPE=Debug VERBOSE=1
+ - os: osx
+ compiler: clang
+ env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
+
+# These are the install and build (script) phases for the most common entries in the matrix. They could be included
+# in each entry in the matrix, but that is just repetitive.
install:
-# /usr/bin/gcc is 4.6 always, but gcc-X.Y is available.
-- if [ "$CXX" = "g++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi
-# /usr/bin/clang is 3.4, lets override with modern one.
-- if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-3.7" CC="clang-3.7"; ln -sf /usr/bin/ccache /$HOME/bin/$CXX; ln -sf /usr/bin/ccache /$HOME/bin/$CC; fi
-# ccache on OS X needs installation first
-- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; brew install ccache; export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
-# reset ccache statistics
-- ccache --zero-stats
-- echo ${PATH}
-- echo ${CXX}
-- ${CXX} --version
-- ${CXX} -v
+ - ./ci/install-${TRAVIS_OS_NAME}.sh
+ - . ./ci/env-${TRAVIS_OS_NAME}.sh
+ - ./ci/log-config.sh
+
+script: ./ci/travis.sh
+
+# For sudo=false builds this section installs the necessary dependencies.
addons:
apt:
# List of whitelisted in travis packages for ubuntu-precise can be found here:
@@ -28,22 +69,6 @@ addons:
packages:
- g++-4.9
- clang-3.7
-os:
- - linux
- - osx
-language: cpp
-cache: ccache
-before_cache:
- # print statistics before uploading new cache
- - ccache --show-stats
-compiler:
- - gcc
- - clang
-script: ./travis.sh
-env:
- matrix:
- - BUILD_TYPE=Debug VERBOSE=1
- - BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
+
notifications:
email: false
-sudo: false