1language: ruby 2env: 3 global: 4 - SHARED=OFF 5 6notifications: 7 email: 8 on_success: never 9 on_failure: always 10 11matrix: 12 13 include: 14 # Default environment of Ubuntu 14.04 15 - os: linux 16 dist: trusty 17 sudo: true 18 language: python 19 python: "3.6" 20 addons: 21 apt: 22 sources: 23 - ubuntu-toolchain-r-test 24 packages: 25 - gcc-4.8 26 - g++-4.8 27 - cmake-data # to use cmake 3.0 or more recent 28 - cmake 29 30 - os: linux 31 dist: trusty 32 sudo: required 33 language: python 34 python: "3.6" 35 addons: 36 apt: 37 sources: 38 - ubuntu-toolchain-r-test 39 packages: 40 - gcc-4.8 41 - g++-4.8 42 - cmake-data # to use cmake 3.0 or more recent 43 - cmake 44 env: SHARED=ON 45 46 # Similar environment of Ubuntu 16.04 (gcc 5.4) 47 # travis ci only supports Ubuntu 14.04 (trusty) gcc-5 and 6 48 # another option is to use docker. 49 - os: linux 50 dist: trusty 51 sudo: required 52 language: python 53 python: "3.6" 54 addons: 55 apt: 56 sources: 57 - ubuntu-toolchain-r-test 58 packages: 59 - gcc-6 60 - g++-6 61 - cmake-data # to use cmake 3.0 or more recent 62 - cmake 63 64 # Default environment of MacOS El Capitan 65 # compiled using clang shipped with xcode8 66 - os: osx 67 osx_image: xcode8 68 69 - os: osx 70 osx_image: xcode8 71 env: SHARED=ON 72 73 # Default environment of MacOS Sierra 74 # compiled using clang shipped with xcode8.3 75 - os: osx 76 osx_image: xcode8.3 77 78before_install: 79 # ISSUE: we may want to use '/scripts/install-deps-ubuntu.sh' in the future. 80 # At this moment, travis-ci supports up to ubuntu 14.04 and this environment 81 # does not recognize sudo apt-get install libglfw3-dev 82 - if [ "$TRAVIS_OS_NAME" == "linux" ]; then 83 sudo apt-get install xorg-dev libglu1-mesa-dev libgl1-mesa-glx libglew-dev libjsoncpp-dev libeigen3-dev libpng-dev libjpeg-dev; 84 ./util/scripts/make-documentation.sh; 85 ./util/scripts/install-gtest.sh; 86 fi 87 # scripts/install-deps-osx.sh works well 88 - if [ "$TRAVIS_OS_NAME" == "osx" ]; then 89 brew install python; 90 ./util/scripts/install-deps-osx.sh; 91 ./util/scripts/install-gtest.sh; 92 fi 93 94 # for reference, display cmake and python version 95 - python -V 96 - cmake --version 97 # - pip install numpy 98 99script: 100 # Build commands 101 - mkdir build 102 - cd build 103 - cmake -DBUILD_SHARED_LIBS=$SHARED -DBUILD_UNIT_TESTS=ON -DBUILD_EIGEN3=ON -DBUILD_GLFW=ON -DBUILD_JPEG=ON -DBUILD_JSONCPP=ON -DBUILD_PNG=ON -DCMAKE_INSTALL_PREFIX=~/open3d_install ../src/ 104 # make -j brings 'virtual memory exhausted: Cannot allocate memory' message 105 # this is presumably due to limited memory space of travis-ci 106 - make install 107 - python -V 108 # The following script has issues on SHARED = "ON" 109 # - if [ "$SHARED" == "OFF" ]; then 110 # cd lib/Tutorial/Basic/ && python file_io.py 111 # fi 112 # test find_package(Open3D) 113 - test=`cmake --find-package -DNAME=Open3D -DCOMPILER_ID=GNU -DLANGUAGE=C -DMODE=EXIST -DCMAKE_PREFIX_PATH="~/open3d_install/lib/CMake"` 114 - if [ "$test" == "Open3D found." ]; then echo "PASSED find_package(Open3D)."; else echo "FAILED find_package(Open3D)."; exit 1; fi 115 116 117