summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 4d2d388db9f712e062022e94253bc396991fad35 (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
language: cpp

matrix:
  include:
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-6
            - libcppunit-dev
            - libboost-dev
      env:
        - MATRIX_EVAL="export CC=gcc-6 CXX=g++-6"

    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-8
            - libcppunit-dev
            - libboost-dev
      env:
        - MATRIX_EVAL="export CC=gcc-8 CXX=g++-8"

    - os: osx
      osx_image: xcode9.3beta
      env:
        - MATRIX_EVAL=""

env:
  global:
    - MAKEFLAGS="-j2"

cache:
  - apt
  - ccache

before_install:
  - eval "${MATRIX_EVAL}"
  # C++14
  - test "$TRAVIS_OS_NAME" != "osx" || brew update

install:
  # C++14
  - test "$TRAVIS_OS_NAME" != "osx" || brew install cppunit ccache

before_script:
  - ccache -s

script:
  - OPTIONS="--enable-test"
  - test "$TRAVIS_OS_NAME" != "osx" || OPTIONS="$OPTIONS --enable-osx"
  - ./autogen.sh
  - ./configure CC="ccache $CC" CXX="ccache $CXX" --disable-silent-rules --disable-dependency-tracking $OPTIONS
  - make
  - make check
  - ccache -s