1# travis-ci.org build file 2# https://docs.travis-ci.com/user/languages/cpp 3 4matrix: 5 include: 6 - os: linux 7 language: cpp 8 compiler: clang 9 - os: linux 10 language: cpp 11 compiler: gcc 12 - os: osx 13 language: cpp 14 compiler: clang 15 - os: osx 16 language: cpp 17 compiler: gcc 18 - os: osx 19 language: cpp 20 compiler: clang 21 osx_image: xcode9.1 22 23env: 24 - OPTIONS="-DCMAKE_BUILD_TYPE=Release -DOCIO_BUILD_TESTS=yes -DOCIO_BUILD_DOCS=yes" 25 26# Install missing packages 27before_install: 28 # Linux ones 29 - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then 30 sudo apt-get update -qq; 31 sudo apt-get install -y -qq texlive-full; 32 fi 33 # OSX ones 34 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then 35 brew update; 36 brew install glew; 37 brew upgrade cmake; 38 brew upgrade pyenv; 39 echo 'eval "$(pyenv init -)"' >> .bash_profile; 40 source .bash_profile; 41 export PYTHON_CONFIGURE_OPTS="--enable-framework"; 42 pyenv install -v 2.7.15; 43 pyenv global 2.7.15; 44 export OPTIONS="$OPTIONS -DPYTHON_LIBRARY=$(python-config --prefix)/lib/libpython2.7.dylib"; 45 export OPTIONS="$OPTIONS -DPYTHON_INCLUDE_DIR=$(python-config --prefix)/include/python2.7"; 46 export OPTIONS="$OPTIONS -DPYTHON_EXECUTABLE=$(which python2)"; 47 fi 48 49# Run the Build script 50script: 51 - mkdir _build 52 - cd _build 53 - cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS 54 - cmake --build . --target install 55 - ctest --output-on-failure . 56 - if [[ "$TRAVIS_OS_NAME" = "linux" ]]; then cmake --build . --target pdf; fi 57 58deploy: 59 provider: pages 60 skip_cleanup: true 61 github_token: $GITHUB_TOKEN 62 on: 63 tags: true 64 local_dir: ./docs/build-html 65