summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: dcd0932b78ced63e250d8f0c8b02d93d1f5ce268 (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
## 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
  ## Are we going to want this on or off?
  irc:
    channels:   "chat.freenode.net#tmwa"
    on_success: always
    on_failure: always
    use_notice: true

## Commands before installing prerequisites
before_install: export CC=${REAL_CC} CXX=${REAL_CXX}

## Install prerequisites
install:
# if > or | folding is used, error
# but YAML folds by default on this, so it works (I hope)
  -
    if [ -n "$PPA" ];
    then
        sudo add-apt-repository --yes $PPA;
    fi
  - sudo apt-get update -qq
  - sudo apt-get install -qq $PACKAGE $DEBUGPACKAGE
  - sudo apt-get install -qq libgtest-dev valgrind
  - make --version

## Do something before the main test script
before_script:
  -
    if [ $PACKAGE = clang-3.1 ];
    then
      wget http://clang.llvm.org/libstdc++4.6-clang11.patch;
      sudo patch /usr/include/c++/4.6/type_traits < libstdc++4.6-clang11.patch;
    fi
  - sudo sed -i /usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.*-gdb.py -e "s:^libdir = .*$:libdir = '/usr/lib/x86_64-linux-gnu':"

## Main test script
script:
  - mkdir build
  - cd build
  - git init
  - ../configure --build=x86_64-linux-gnu --dev CPPFLAGS=-DQUIET `! [[ $CXX =~ clang* ]] || echo --disable-abi6 --disable-shared` $EXTRA_CONFIGURE_ARGS
  - make -R -k -j2
  - make -R -k -j2 test TESTER='valgrind --error-exitcode=1 --track-fds=yes'

## Do something after the main test script
#after_script:
  - 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
### containing gcc-4.6 through gcc-4.8 and clang-3.1 through clang-3.3

## This doesn't work - travis defaults to plain gcc if unknown
## http://github.com/travis-ci/travis-ci/issues/979
#compiler:
#  - gcc-4.6
#  - gcc-4.7
#  - gcc-4.8
#  - clang-3.1
#  - clang-3.2
#  - clang-3.3
env:
  - ignore=this

matrix:
  allow_failures:
    - compiler: clang
      env: REAL_CC=clang-3.3 REAL_CXX=clang++-3.3 PPA=ppa:h-rayflood/llvm         PACKAGE=clang-3.3 DEBUGPACKAGE=libstdc++6-4.6-dbg
    - compiler: clang
      env: REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PPA=ppa:h-rayflood/llvm         PACKAGE=clang-3.5 DEBUGPACKAGE=libstdc++6-4.6-dbg
  exclude:
    - env: ignore=this
  include:
    - compiler: clang
      env: REAL_CC=clang-3.3 REAL_CXX=clang++-3.3 PPA=ppa:h-rayflood/llvm         PACKAGE=clang-3.3 DEBUGPACKAGE=libstdc++6-4.6-dbg
    - compiler: clang
      env: REAL_CC=clang-3.4 REAL_CXX=clang++-3.4 PPA=ppa:h-rayflood/llvm         PACKAGE=clang-3.4 DEBUGPACKAGE=libstdc++6-4.6-dbg
    - compiler: clang
      env: REAL_CC=clang-3.5 REAL_CXX=clang++-3.5 PPA=ppa:h-rayflood/llvm         PACKAGE=clang-3.5 DEBUGPACKAGE=libstdc++6-4.6-dbg
    - compiler: gcc
      env: REAL_CC=gcc-4.7   REAL_CXX=g++-4.7     PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.7 DEBUGPACKAGE=libstdc++6-4.8-dbg
    - compiler: gcc
      env: REAL_CC=gcc-4.8   REAL_CXX=g++-4.8     PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.8 DEBUGPACKAGE=libstdc++6-4.8-dbg

    - compiler: gcc
      env: REAL_CC=gcc-4.7   REAL_CXX=g++-4.7     PPA=ppa:ubuntu-toolchain-r/test PACKAGE=g++-4.7 DEBUGPACKAGE=libstdc++6-4.8-dbg EXTRA_CONFIGURE_ARGS=--disable-warnings

# everything that was pushed to stable was already on 'master', except
# the version change and some doc changes.
branches:
  except:
    - stable