summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 8142575c2cbf1959501d5f3f9acd10edfa6b5b54 (plain)
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
# Build matrix / environment variable are explained on:
# http://about.travis-ci.org/docs/user/build-configuration/
# 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
      install: ./ci/install-linux.sh && ./ci/log-config.sh
      script: ./ci/build-linux-autotools.sh
    - os: linux
      compiler: gcc
      env: BUILD_TYPE=Debug 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
      if: event != pull_request
    - os: osx
      compiler: gcc
      env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
      if: event != pull_request
    - os: osx
      compiler: clang
      env: BUILD_TYPE=Debug VERBOSE=1
      if: event != pull_request
    - os: osx
      compiler: clang
      env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11
      if: event != pull_request

# 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:
  - ./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:
    #   https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
    # List of whitelisted in travis apt-sources:
    #   https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
    sources:
    - ubuntu-toolchain-r-test
    - llvm-toolchain-precise-3.7
    packages:
    - g++-4.9
    - clang-3.7

notifications:
  email: false