summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 26bef5cac0f4dbd526b14afede6f433e73c4bdcf (plain) (blame)
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
## Doesn't appear to do anything useful.
language: cpp

## Notifications
## The default is to send email on all failures and changed success
## Adding other notifiers (like IRC) does not disable the email one
notifications:
  ## This is, in fact, the default email setting so it is unnecessary.
  ## It would probably be too annoying to set on_success: always
  email:
    on_success: changed
    on_failure: always

## Use the container-based infrastructure
sudo: false

## Commands before installing
before_install:
  - if [ $(git rev-list --count HEAD ^master) -gt 50 ] ; then exit 1; fi
  - export CC="${REAL_CC} ${REAL_EXTRA}" CXX="${REAL_CXX} ${REAL_EXTRA}"

install:
  - make --version
  - mkdir build
  - cd build
  - git init
  - ../configure --build=x86_64-linux-gnu --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi` $EXTRA_CONFIGURE_ARGS
  - sed -n '/One Makefile/q;p' Makefile

## Main test script
script:
  - make -R -k -j2
  # Use - instead of :- to allow forcing an empty one
  - make -R -k -j2 test TESTER="${FORCE_TESTER-${DEFAULT_TESTER}}"
  - make -R -k -j2 format
  - git --git-dir=../.git --work-tree=.. diff --exit-code
  - make -R -k -j2 dist bindist

### The rest of the file creates a build matrix
env:
  global:
    - DEFAULT_TESTER='valgrind --error-exitcode=1 --track-fds=yes'
matrix:
  fast-finish: true
  include:
    - compiler: clang
      env: REAL_CC=clang-3.5     REAL_CXX=clang++-3.5
      addons:
        apt:
          sources:
          - llvm-toolchain-precise-3.5
          # needed for libstdc++ headers
          - ubuntu-toolchain-r-test
          packages:
          - clang-3.5
          - libstdc++6-4.6-dbg
          - libgtest-dev
          - valgrind
          - gdb
    - compiler: clang
      env: REAL_CC=clang-3.6     REAL_CXX=clang++-3.6
      addons:
        apt:
          sources:
          - llvm-toolchain-precise-3.6
          # needed for libstdc++ headers
          - ubuntu-toolchain-r-test
          packages:
          - clang-3.6
          - libstdc++6-4.6-dbg
          - libgtest-dev
          - valgrind
          - gdb
    - compiler: clang
      env: REAL_CC=clang-3.7     REAL_CXX=clang++-3.7
      addons:
        apt:
          sources:
          - llvm-toolchain-precise-3.7
          # needed for libstdc++ headers
          - ubuntu-toolchain-r-test
          packages:
          - clang-3.7
          - libstdc++6-4.6-dbg
          - libgtest-dev
          - valgrind
          - gdb
    # Can't use valgrind and asan at the same time.
    # Should probably fix the test leaks though.
    - compiler: gcc
      env: REAL_CC=gcc-5     REAL_CXX=g++-5  REAL_EXTRA=-fsanitize=address  FORCE_TESTER='' ASAN_OPTIONS=detect_leaks=0   LDFLAGS="-fuse-ld=gold"
      addons:
        apt:
          sources:
          - ubuntu-toolchain-r-test
          packages:
          - g++-5
          - libstdc++6-5-dbg
          - libgtest-dev
          # - valgrind
          - gdb
  allow_failures:
    - compiler: gcc
      env: REAL_CC=gcc-4.7     REAL_CXX=g++-4.7   LDFLAGS="-fuse-ld=gold"
      addons:
        apt:
          sources:
          - ubuntu-toolchain-r-test
          packages:
          - g++-4.7
          - libstdc++6-4.7-dbg
          - libgtest-dev
          - valgrind
          - gdb
    - compiler: gcc
      env: REAL_CC=gcc-4.8     REAL_CXX=g++-4.8   LDFLAGS="-fuse-ld=gold"
      addons:
        apt:
          sources:
          - ubuntu-toolchain-r-test
          packages:
          - g++-4.8
          - libstdc++6-4.8-dbg
          - libgtest-dev
          - valgrind
          - gdb
    - compiler: gcc
      env: REAL_CC=gcc-4.9     REAL_CXX=g++-4.9   LDFLAGS="-fuse-ld=gold"
      addons:
        apt:
          sources:
          - ubuntu-toolchain-r-test
          packages:
          - g++-4.9
          - libstdc++6-4.9-dbg
          - libgtest-dev
          - valgrind
          - gdb
    - compiler: gcc
      env: REAL_CC=gcc-5     REAL_CXX=g++-5   LDFLAGS="-fuse-ld=gold"
      addons:
        apt:
          sources:
          - ubuntu-toolchain-r-test
          packages:
          - g++-5
          - libstdc++6-5-dbg
          - libgtest-dev
          - valgrind
          - gdb
    # LTO is buggy.
    - compiler: gcc
      env: REAL_CC=gcc-5     REAL_CXX=g++-5  REAL_EXTRA=-flto   LDFLAGS="-fuse-ld=gold"
      addons:
        apt:
          sources:
          - ubuntu-toolchain-r-test
          packages:
          - g++-5
          - libstdc++6-5-dbg
          - libgtest-dev
          - valgrind
          - gdb

# everything that was pushed to stable was already on 'master', except
# the version change and some doc changes.
# everything that was pushed to test-server was in a PR so it passed travis
branches:
  except:
    - stable
    - test-server