From fd2a8f5c70c3b3e1287502e3c4b5bbd63bdc976f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 18 Nov 2019 11:43:37 -0700 Subject: [PATCH] Improve Travis: test on Linux and macOS Keep the Doxygen run as before, but also test building and installing using cmake on Linux and macOS with both gcc and clang. --- .travis.yml | 91 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 35 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3fc74e6c7c..f9620d7f77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,45 +1,65 @@ +language: cpp sudo: false +compiler: + - gcc + - clang +os: + - linux + - osx dist: xenial +osx_image: xcode7.3 -branches: - only: - - master +matrix: + exclude: + - compiler: clang + - os: osx + include: + - env: BUILD_DOXYGEN="yes" + compiler: gcc + os: linux + addons: + apt: + packages: + - doxygen + - doxygen-doc + - doxygen-latex + - doxygen-gui + - graphviz + install: + - pwd + - doxygen --version + ############################################################################ + # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/ + ############################################################################ + - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" + - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} + ############################################################################ + # Install a recent Doxygen + ############################################################################ + - DOXYGEN_URL="http://doxygen.nl/files/doxygen-1.8.16.linux.bin.tar.gz" + - mkdir doxygen + - travis_retry wget -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen + - export PATH=${DEPS_DIR}/doxygen/bin:${PATH} + - doxygen --version + script: + - pwd + - cd ${TRAVIS_BUILD_DIR} + - cd doc + - doxygen --version + - doxygen Doxyfile + - echo "" > html/.nojekyll -# Install dependencies -addons: - apt: - packages: - - doxygen - - doxygen-doc - - doxygen-latex - - doxygen-gui - - graphviz - - install: - - pwd - - doxygen --version - ############################################################################ - # All the dependencies are installed in ${TRAVIS_BUILD_DIR}/deps/ - ############################################################################ - - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" - - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR} - ############################################################################ - # Install a recent Doxygen - ############################################################################ - - DOXYGEN_URL="http://doxygen.nl/files/doxygen-1.8.16.linux.bin.tar.gz" - - mkdir doxygen - - travis_retry wget -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen - - export PATH=${DEPS_DIR}/doxygen/bin:${PATH} - - doxygen --version + - cmake --version script: - - pwd - - cd ${TRAVIS_BUILD_DIR} - - cd doc - - doxygen --version - - doxygen Doxyfile - - echo "" > html/.nojekyll + - mkdir build + - cd build + - cmake -DCMAKE_INSTALL_PREFIX=$HOME/ext .. + - cmake --build . --target install + +notifications: + email: false deploy: provider: pages @@ -50,3 +70,4 @@ deploy: github_token: $GH_REPO_TOKEN on: branch: master + condition: $BUILD_DOXYGEN = yes