language: c

sudo: false

matrix:
  include:
  - os: linux
    compiler: gcc
    env: O3=1
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - gcc-4.9
  - os: linux
    compiler: clang
    env: O3=1
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - clang
  - os: linux
    compiler: gcc
    env: O3=1 STATIC=1
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - gcc-4.9
  - os: linux
    compiler: clang
    env: O3=1 STATIC=1
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - clang
  - os: osx
    compiler: gcc
    env: O3=1
  - os: osx
    compiler: clang
    env: O3=1
  - os: osx
    compiler: gcc
    env: O3=1 STATIC=1
  - os: osx
    compiler: clang
    env: O3=1 STATIC=1

branches:
  only:
    - master

install:
  - ./autogen.sh
  - ./configure ${STATIC+--disable-shared} ${DEBUG+--enable-debug} ${VALGRIND+--enable-valgrind} ${CENSUS+--enable-census}
  - make V=1

script:
  - make check

after_failure:
  - for f in tests/*.log; do echo; echo "${f}:"; cat $f; done;
  - cat test-suite.log

notifications:
  email: false

language: c

sudo: false

matrix:
  include:
  - os: linux
    compiler: gcc
    env: 
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - gcc-4.9
  - os: linux
    compiler: clang
    env: 
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - clang
  - os: linux
    compiler: gcc
    env: STATIC=1
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - gcc-4.9
  - os: linux
    compiler: clang
    env: STATIC=1
    addons:
      apt:
        sources:
          - ubuntu-toolchain-r-test
        packages:
          - clang
  - os: osx
    compiler: gcc
    env: 
  - os: osx
    compiler: clang
    env: 
  - os: osx
    compiler: gcc
    env: STATIC=1
  - os: osx
    compiler: clang
    env: STATIC=1

branches:
  only:
    - master

install:
  - ./autogen.sh
  - CFLAGS=-O3 ./configure ${STATIC+--disable-shared} ${DEBUG+--enable-debug} ${VALGRIND+--enable-valgrind} ${CENSUS+--enable-census}
  - make V=1

script:
  - make check

after_failure:
  - for f in tests/*.log; do echo; echo "${f}:"; cat $f; done;
  - cat test-suite.log

notifications:
  email: false

Build with O3 by default
Travis: Build with O3 by default

Signed-off-by: Martin Sustrik <4dd6061be1198639e8b05ce4fd5ead7a0dcaa0f4@250bpm.com>
