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
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