|
1 | | -sudo: required |
2 | | -dist: trusty |
| 1 | +dist: trusty # Use 'trusty' unless specified otherwise |
| 2 | +os: linux # Use Linux unless specified otherwise |
| 3 | +sudo: false |
3 | 4 |
|
4 | 5 | language: cpp |
5 | 6 |
|
6 | | -env: |
7 | | - - C_COMPILER=gcc-7 CXX_COMPILER=g++-7 |
8 | | - - C_COMPILER=clang-5.0 CXX_COMPILER=clang++-5.0 |
| 7 | +matrix: |
| 8 | + include: |
| 9 | + - env: C_COMPILER=gcc-7 CXX_COMPILER=g++-7 GENERATOR_NAME="Unix Makefiles" |
| 10 | + addons: { apt: { packages: ["g++-7"], sources: ["ubuntu-toolchain-r-test"] } } |
9 | 11 |
|
10 | | -before_install: |
11 | | - - pyenv global system 3.6 # Workaround for travis-ci/issues/8363 |
12 | | - - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y |
13 | | - - wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - |
14 | | - - echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-5.0 main" | sudo tee -a /etc/apt/sources.list |
15 | | - - sudo apt-get update -q |
16 | | - - sudo apt-get install gcc-7 g++-7 -y |
17 | | - - sudo apt-get install clang-5.0 -y |
18 | | - - sudo apt-get install libboost-all-dev libopencv-dev -y |
19 | | - - wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz |
20 | | - - tar -xvzf cmake-3.8.2-Linux-x86_64.tar.gz |
| 12 | + - env: C_COMPILER=clang-5.0 CXX_COMPILER=clang++-5.0 GENERATOR_NAME="Unix Makefiles" |
| 13 | + addons: { apt: { packages: ["g++-7", "clang-5.0"], sources: ["llvm-toolchain-trusty-5.0", "ubuntu-toolchain-r-test"] } } |
| 14 | + # g++-7 is needed here - otherwise the build will fail because g++-4.8 libstdc++ is used. |
| 15 | + |
| 16 | + - os: osx |
| 17 | + env: C_COMPILER=clang CXX_COMPILER=clang++ GENERATOR_NAME="Xcode" |
| 18 | + osx_image: xcode9.2 |
| 19 | + |
| 20 | +install: |
| 21 | + - | |
| 22 | + if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then |
| 23 | + wget https://cmake.org/files/v3.8/cmake-3.8.2-Linux-x86_64.tar.gz |
| 24 | + CMAKE_DIR=${TRAVIS_BUILD_DIR}/cmake && mkdir ${CMAKE_DIR} |
| 25 | + tar -xvzf cmake-3.8.2-Linux-x86_64.tar.gz --strip-components=1 -C ${CMAKE_DIR} # extract from inside the top-level directory to CMAKE_DIR |
| 26 | + export PATH=${CMAKE_DIR}/bin:${PATH} |
| 27 | + pyenv global system 3.6 # Workaround for travis-ci/issues/8363 |
| 28 | + sudo apt-get update -q |
| 29 | + sudo apt-get install libboost-all-dev libopencv-dev -y |
| 30 | + else |
| 31 | + brew install cmake || brew upgrade cmake |
| 32 | + brew install boost |
| 33 | + /usr/bin/yes | pip2 uninstall numpy # see: travis-ci/issues/6688 |
| 34 | + brew install opencv |
| 35 | + fi |
| 36 | + - cmake --version |
21 | 37 |
|
22 | 38 | before_script: |
23 | 39 | - mkdir build |
24 | 40 | - cd build |
25 | | - - ../cmake-3.8.2-Linux-x86_64/bin/cmake -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DEOS_BUILD_EXAMPLES=on -DEOS_BUILD_UTILS=on -DEOS_GENERATE_PYTHON_BINDINGS=on -DPYTHON_EXECUTABLE=`which python3.6` .. |
| 41 | + - cmake -G "${GENERATOR_NAME}" -DCMAKE_C_COMPILER=${C_COMPILER} -DCMAKE_CXX_COMPILER=${CXX_COMPILER} -DCMAKE_INSTALL_PREFIX=../install -DEOS_BUILD_EXAMPLES=on -DEOS_BUILD_UTILS=on -DEOS_GENERATE_PYTHON_BINDINGS=on -DPYTHON_EXECUTABLE=`which python3.6` .. |
26 | 42 |
|
27 | 43 | script: |
28 | | - - make VERBOSE=1 |
| 44 | + - cmake --build . --config Release |
| 45 | + - cmake --build . --target install --config Release |
0 commit comments