language: cpp
compiler:
  - gcc
  - clang
sudo: false
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    - llvm-toolchain-precise-3.7
    packages:
    - g++-5
    - clang-3.7
before_install:
 - cd /tmp
 - wget http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz
 - tar xzf cmake-3.3.1-Linux-x86_64.tar.gz
 - export PATH=/tmp/cmake-3.3.1-Linux-x86_64/bin:$PATH
 - cd -
before_script: mkdir build && cd build
script: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_ESCRIPT_APPLICATION=ON -DBUILD_ESCRIPT_TEST=ON .. && make && cpack && cp libEScript.tar.gz /tmp && cd /tmp && tar xzf libEScript.tar.gz && cd libEScript/share/EScript && LD_LIBRARY_PATH=../../lib/x86_64-linux-gnu/ ../../bin/escript_test && LD_LIBRARY_PATH=../../lib/x86_64-linux-gnu/ valgrind --tool=memcheck --leak-check=no --track-origins=yes --error-exitcode=200 ../../bin/escript_test


language: cpp
compiler:
  - gcc
  - clang
sudo: false
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    - llvm-toolchain-precise-3.7
    packages:
    - g++-5
    - clang-3.7
before_install:
 - cd /tmp
 - wget http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz
 - tar xzf cmake-3.3.1-Linux-x86_64.tar.gz
 - export PATH=/tmp/cmake-3.3.1-Linux-x86_64/bin:$PATH
 - cd -
before_script: mkdir build && cd build && if [ "${CXX}" = "clang++" ]; then export CXX=clang++-3.7; fi && if [ "${CXX}" = "g++" ]; then export CXX=g++-5; fi
script: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_ESCRIPT_APPLICATION=ON -DBUILD_ESCRIPT_TEST=ON .. && make && cpack && cp libEScript.tar.gz /tmp && cd /tmp && tar xzf libEScript.tar.gz && cd libEScript/share/EScript && LD_LIBRARY_PATH=../../lib/x86_64-linux-gnu/ ../../bin/escript_test && LD_LIBRARY_PATH=../../lib/x86_64-linux-gnu/ valgrind --tool=memcheck --leak-check=no --track-origins=yes --error-exitcode=200 ../../bin/escript_test


Use newer compilers by setting CXX
Travis-CI: Use newer compilers by setting CXX
