language: cpp

env:
  - LLVM_VERSION=3.5 GCC_VERSION=4.8
  - LLVM_VERSION=3.6 GCC_VERSION=4.8
  - LLVM_VERSION=3.7 GCC_VERSION=4.8

matrix:
  allow_failures: #llvm-3.7 is currently broken
  - env: LLVM_VERSION=3.7 GCC_VERSION=4.8

before_install:
 - if [[ ${LLVM_VERSION} != 3.7 ]]; then
     sudo add-apt-repository -y "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-${LLVM_VERSION} main";
   else
     sudo add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main';
   fi
 - sudo add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'
 - wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
 - sudo add-apt-repository -y 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main'
 - sudo apt-get update 
 - sudo apt-get install llvm-${LLVM_VERSION}-dev clang-${LLVM_VERSION} g++-${GCC_VERSION}
 - if [[ $CXX = "g++" ]]; then
     export CXX="g++-${GCC_VERSION}";
     export CC="gcc-${GCC_VERSION}"; 
   else 
     export CXX="clang++-${LLVM_VERSION}";
     export CC="clang-${LLVM_VERSION}";
   fi
 - export LLVM_CONFIG=llvm-config-${LLVM_VERSION}

script: 
  - autoreconf -i && ./configure && make distcheck

compiler:
  - clang
  - gcc

language: cpp

env:
  - LLVM_VERSION=3.5 GCC_VERSION=4.6
  - LLVM_VERSION=3.5 GCC_VERSION=4.7
  - LLVM_VERSION=3.5 GCC_VERSION=4.8

before_install:
 - sudo add-apt-repository -y "deb http://llvm.org/apt/precise/ llvm-toolchain-precise-${LLVM_VERSION} main"
 - sudo add-apt-repository -y 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'
 - wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
 - sudo add-apt-repository -y 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main'
 - sudo apt-get update 
 - sudo apt-get install llvm-${LLVM_VERSION}-dev clang-${LLVM_VERSION} g++-${GCC_VERSION}
 - if [[ $CXX = "g++" ]]; then
     export CXX="g++-${GCC_VERSION}";
     export CC="gcc-${GCC_VERSION}"; 
   else 
     export CXX="clang++-${LLVM_VERSION}";
     export CC="clang-${LLVM_VERSION}";
   fi
 - export LLVM_CONFIG=llvm-config-${LLVM_VERSION}

script: 
  - autoreconf -i && ./configure && make distcheck

compiler:
  - clang
  - gcc

Build the llvm-3.5 branch only with LLVM 3.5
Build the llvm-3.5 branch only with LLVM 3.5
