1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-05 22:53:52 +00:00

Cleaner build, builds doxygen and stashes it

This commit is contained in:
Henry Fredrick Schreiner 2017-02-15 11:43:28 -05:00
parent 72397aaffe
commit f91e995b63
3 changed files with 36 additions and 11 deletions

12
.ci/build_cmake.sh Normal file
View File

@ -0,0 +1,12 @@
if [ "$TRAVIS_OS_NAME" = "linux" ] ; then CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz" ; fi
if [ "$TRAVIS_OS_NAME" = "osx" ] ; then CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Darwin-x86_64.tar.gz" ; fi
cd "${DEPS_DIR}"
if [[ ! -f "${DEPS_DIR}/cmake/bin/cmake" ]] ; then
echo "Downloading CMake"
mkdir -p cmake
travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake
fi
export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
cd "${TRAVIS_BUILD_DIR}"

17
.ci/build_doxygen.sh Normal file
View File

@ -0,0 +1,17 @@
DOXYGEN_URL="ftp://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz"
cd "${DEPS_DIR}"
if [[ ! -f "${DEPS_DIR}/doxygen/bin/doxygen" ]] ; then
echo "Downloading Doxygen"
mkdir -p doxygen
travis_retry wget --no-check-certificate --quiet -O - "${DOXYGEN_URL}" | tar --strip-components=1 -xz -C doxygen
cd doxygen
mkdir -p build
cd build
cmake ..
make -j2
fi
export PATH="${DEPS_DIR}/doxygen/build/bin:${PATH}"
cd "${TRAVIS_BUILD_DIR}"

View File

@ -9,6 +9,7 @@ env:
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps/cmake
- ${TRAVIS_BUILD_DIR}/deps/doxygen
matrix:
include:
- os: osx
@ -40,24 +41,18 @@ matrix:
packages:
- g++-4.7
env: COMPILER=4.7
install:
- python -c 'import sys; print(sys.version_info[:])'
- if [ "$CXX" = "g++" ]; then export CXX="g++-$COMPILER" CC="gcc-$COMPILER"; fi
- if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then export CXX="clang++-$COMPILER" CC="clang-$COMPILER"; fi
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- if [ "$TRAVIS_OS_NAME" = "linux" ] ; then CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Linux-x86_64.tar.gz" ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] ; then CMAKE_URL="https://cmake.org/files/v3.7/cmake-3.7.2-Darwin-x86_64.tar.gz" ; fi
- cd "${DEPS_DIR}"
- |
if [[ ! -f "${DEPS_DIR}/cmake/bin/cmake" ]] ; then
echo "Downloading CMake"
mkdir -p cmake
travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake
fi
- export PATH="${DEPS_DIR}/cmake/bin:${PATH}"
- cd $TRAVIS_BUILD_DIR && . .ci/build_cmake.sh
- cd $TRAVIS_BUILD_DIR && . .ci/build_doxygen.sh
- cd "${DEPS_DIR}"
- if [ "$(python -c 'import sys; print(sys.version_info[0])')" = "2" ] ; then pip
install --user pathlib; fi
script:
- cd "${TRAVIS_BUILD_DIR}"
- .ci/travis.sh
@ -65,7 +60,8 @@ script:
after_success:
- echo "${TRAVIS_BRANCH}"
- echo "${TRAVIS_PULL_REQUEST}"
- if [[ "${TRAVIS_BRANCH}" == "master" && "${TRAVIS_PULL_REQUEST}" == "false" && "$DEPLOY_MAT" == "yes" ]] ; then echo "Updating docs" && cd $TRAVIS_BUILD_DIR && .ci/build_docs.sh ; fi
- if [[ "${TRAVIS_BRANCH}" == "master" && "${TRAVIS_PULL_REQUEST}" == "false" && "$DEPLOY_MAT" == "yes" ]] ;\
then echo "Updating docs" && cd $TRAVIS_BUILD_DIR && .ci/build_docs.sh ; fi
deploy:
provider: releases