diff --git a/.travis.yml b/.travis.yml index 4d42d7f..2a7d752 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,18 +28,6 @@ matrix: - cmake - cmake-data env: CXX_COMPILER=g++-5 C_COMPILER=gcc-5 - - compiler: clang - addons: - apt: - sources: - - george-edison55-precise-backports - - ubuntu-toolchain-r-test - - llvm-toolchain-precise-3.6 - packages: - - clang-3.6 - - cmake - - cmake-data - env: CXX_COMPILER=clang++-3.6 C_COMPILER=clang-3.6 - compiler: clang addons: apt: @@ -57,6 +45,4 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -y libopencv-dev script: - - mkdir build - - cd build - - cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_C_COMPILER=$C_COMPILER .. && ./dev/run-tests.sh \ No newline at end of file + - ./dev/travis-run-tests.sh \ No newline at end of file diff --git a/dev/travis-run-tests.sh b/dev/travis-run-tests.sh new file mode 100755 index 0000000..766ed03 --- /dev/null +++ b/dev/travis-run-tests.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +SRC=`pwd` + +rm -rf /tmp/build +mkdir -p /tmp/build +cd /tmp/build +if [ ! -d "optional" ]; then + mkdir -p optional + curl -Ls https://api.github.com/repos/akrzemi1/Optional/tarball | tar --strip-components=1 -xz -C optional +fi +cmake -DCMAKE_CXX_COMPILER=$CXX_COMPILER -DCMAKE_C_COMPILER=$C_COMPILER -DEXPERIMENTAL_OPTIONAL_INCLUDE=/tmp/build/optional ${SRC} + +make -j8 tests && ./tests/tests \ No newline at end of file