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.
This commit is contained in:
Ondřej Čertík 2019-11-18 11:43:37 -07:00
parent cbd9882a30
commit fd2a8f5c70

View File

@ -1,45 +1,65 @@
language: cpp
sudo: false sudo: false
compiler:
- gcc
- clang
os:
- linux
- osx
dist: xenial dist: xenial
osx_image: xcode7.3
branches: matrix:
only: exclude:
- master - 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: install:
- pwd - cmake --version
- 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: script:
- pwd - mkdir build
- cd ${TRAVIS_BUILD_DIR} - cd build
- cd doc - cmake -DCMAKE_INSTALL_PREFIX=$HOME/ext ..
- doxygen --version - cmake --build . --target install
- doxygen Doxyfile
- echo "" > html/.nojekyll notifications:
email: false
deploy: deploy:
provider: pages provider: pages
@ -50,3 +70,4 @@ deploy:
github_token: $GH_REPO_TOKEN github_token: $GH_REPO_TOKEN
on: on:
branch: master branch: master
condition: $BUILD_DOXYGEN = yes