Commit 2ef176e86c78941782cfb9b21b957632d360c9d8
Committed by
GitHub
1 parent
b4b7d991
Dropping cmake and clang 5 since they are now in Travis (#89)
* Dropping cmake and clang 5 since they are now in Travis * Dropping pathlib since it is now unused * Doxy build * Folding output and fixing ccache
Showing
11 changed files
with
105 additions
and
113 deletions
.appveyor.yml
.ci/build_cmake.sh deleted
| 1 | -CMAKE_VERSION=3.9.6 | ||
| 2 | -CMAKE_MVERSION=${CMAKE_VERSION%.*} | ||
| 3 | -# Non Bash version: | ||
| 4 | -# echo CMAKE_MVERSION=`$var | awk -F"." '{ print $1"."$2 }'` | ||
| 5 | - | ||
| 6 | -if [ "$TRAVIS_OS_NAME" = "linux" ] ; then CMAKE_URL="https://cmake.org/files/v${CMAKE_MVERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.tar.gz" ; fi | ||
| 7 | -if [ "$TRAVIS_OS_NAME" = "osx" ] ; then CMAKE_URL="https://cmake.org/files/v$CMAKE_MVERSION/cmake-$CMAKE_VERSION-Darwin-x86_64.tar.gz" ; fi | ||
| 8 | -cd "${DEPS_DIR}" | ||
| 9 | - | ||
| 10 | -if [[ ! -f "${DEPS_DIR}/cmake/bin/cmake" ]] ; then | ||
| 11 | - echo "Downloading CMake $CMAKE_VERSION" | ||
| 12 | - mkdir -p cmake | ||
| 13 | - travis_retry wget --no-check-certificate --quiet -O - "${CMAKE_URL}" | tar --strip-components=1 -xz -C cmake | ||
| 14 | -fi | ||
| 15 | - | ||
| 16 | -export PATH="${DEPS_DIR}/cmake/bin:${PATH}" | ||
| 17 | -cd "${TRAVIS_BUILD_DIR}" |
.ci/build_doxygen.sh
| 1 | +set -evx | ||
| 2 | + | ||
| 1 | DOXYGEN_URL="ftp://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz" | 3 | DOXYGEN_URL="ftp://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz" |
| 2 | cd "${DEPS_DIR}" | 4 | cd "${DEPS_DIR}" |
| 3 | 5 | ||
| @@ -15,3 +17,6 @@ fi | @@ -15,3 +17,6 @@ fi | ||
| 15 | export PATH="${DEPS_DIR}/doxygen/build/bin:${PATH}" | 17 | export PATH="${DEPS_DIR}/doxygen/build/bin:${PATH}" |
| 16 | 18 | ||
| 17 | cd "${TRAVIS_BUILD_DIR}" | 19 | cd "${TRAVIS_BUILD_DIR}" |
| 20 | + | ||
| 21 | +set +evx | ||
| 22 | + |
.ci/build_lcov.sh
| 1 | +set -evx | ||
| 2 | + | ||
| 1 | LCOV_URL="http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz" | 3 | LCOV_URL="http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz" |
| 2 | cd "${DEPS_DIR}" | 4 | cd "${DEPS_DIR}" |
| 3 | 5 | ||
| @@ -9,3 +11,5 @@ fi | @@ -9,3 +11,5 @@ fi | ||
| 9 | 11 | ||
| 10 | export PATH="${DEPS_DIR}/lcov/bin:${PATH}" | 12 | export PATH="${DEPS_DIR}/lcov/bin:${PATH}" |
| 11 | cd "${TRAVIS_BUILD_DIR}" | 13 | cd "${TRAVIS_BUILD_DIR}" |
| 14 | + | ||
| 15 | +set +evx |
.ci/check_tidy.sh
| 1 | -#!/usr/bin/env sh | 1 | +#!/usr/bin/env bash |
| 2 | + | ||
| 3 | +echo -en "travis_fold:start:script.build\\r" | ||
| 4 | +echo "Building with tidy on..." | ||
| 2 | set -evx | 5 | set -evx |
| 3 | 6 | ||
| 4 | -mkdir build-tidy || true | 7 | +mkdir -p build-tidy |
| 5 | cd build-tidy | 8 | cd build-tidy |
| 6 | CXX_FLAGS="-Werror -Wall -Wextra -pedantic -std=c++11" cmake .. -DCLANG_TIDY_FIX=ON | 9 | CXX_FLAGS="-Werror -Wall -Wextra -pedantic -std=c++11" cmake .. -DCLANG_TIDY_FIX=ON |
| 7 | cmake --build . | 10 | cmake --build . |
| 8 | 11 | ||
| 12 | +set -evx | ||
| 13 | +echo -en "travis_fold:end:script.build\\r" | ||
| 14 | +echo -en "travis_fold:start:script.compare\\r" | ||
| 15 | +echo "Checking git diff..." | ||
| 16 | +set -evx | ||
| 17 | + | ||
| 9 | git diff --exit-code --color | 18 | git diff --exit-code --color |
| 10 | 19 | ||
| 11 | set +evx | 20 | set +evx |
| 21 | +echo -en "travis_fold:end:script.compare\\r" |
.ci/make_and_test.sh
0 โ 100755
| 1 | +#!/usr/bin/env bash | ||
| 2 | +echo -en "travis_fold:start:script.build\\r" | ||
| 3 | +echo "Building..." | ||
| 4 | +set -evx | ||
| 5 | + | ||
| 6 | +mkdir -p build | ||
| 7 | +cd build | ||
| 8 | +cmake .. -DCLI_CXX_STD=$1 -DCLI_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | ||
| 9 | +cmake --build . -- -j2 | ||
| 10 | + | ||
| 11 | +set +evx | ||
| 12 | +echo -en "travis_fold:end:script.build\\r" | ||
| 13 | +echo -en "travis_fold:start:script.test\\r" | ||
| 14 | +echo "Testing..." | ||
| 15 | +set -evx | ||
| 16 | + | ||
| 17 | +ctest --output-on-failure | ||
| 18 | + | ||
| 19 | +set +evx | ||
| 20 | +echo -en "travis_fold:end:script.test\\r" |
.ci/prepare_altern.sh deleted
| 1 | -cd "${DEPS_DIR}" | ||
| 2 | -mkdir -p extrabin | ||
| 3 | -cd extrabin | ||
| 4 | - | ||
| 5 | -if [ "$CXX" = "g++" ] ; then | ||
| 6 | - ln -s `which gcc-$COMPILER` gcc | ||
| 7 | - ln -s `which g++-$COMPILER` g++ | ||
| 8 | - ln -s `which gcov-$COMPILER` gcov | ||
| 9 | -else | ||
| 10 | - ln -s `which clang-$COMPILER` clang | ||
| 11 | - ln -s `which clang++-$COMPILER` clang++ | ||
| 12 | - ln -s `which clang-format-$COMPILER` clang-format | ||
| 13 | - ln -s `which clang-tidy-$COMPILER` clang-tidy | ||
| 14 | -fi | ||
| 15 | - | ||
| 16 | -export PATH="${DEPS_DIR}/extrabin":$PATH | ||
| 17 | - | ||
| 18 | -cd "${TRAVIS_BUILD_DIR}" |
.ci/run_codecov.sh
| 1 | +#!/usr/bin/env bash | ||
| 2 | + | ||
| 3 | +echo -en "travis_fold:start:script.build\\r" | ||
| 4 | +echo "Building..." | ||
| 1 | set -evx | 5 | set -evx |
| 2 | 6 | ||
| 3 | cd ${TRAVIS_BUILD_DIR} | 7 | cd ${TRAVIS_BUILD_DIR} |
| @@ -7,8 +11,17 @@ cmake .. -DCLI_SINGLE_FILE_TESTS=OFF -DCLI_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Cover | @@ -7,8 +11,17 @@ cmake .. -DCLI_SINGLE_FILE_TESTS=OFF -DCLI_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Cover | ||
| 7 | cmake --build . -- -j2 | 11 | cmake --build . -- -j2 |
| 8 | cmake --build . --target CLI_coverage | 12 | cmake --build . --target CLI_coverage |
| 9 | 13 | ||
| 14 | +set +evx | ||
| 15 | +echo -en "travis_fold:end:script.build\\r" | ||
| 16 | +echo -en "travis_fold:start:script.lcov\\r" | ||
| 17 | +echo "Capturing and uploading LCov..." | ||
| 18 | +set -evx | ||
| 19 | + | ||
| 10 | lcov --directory . --capture --output-file coverage.info # capture coverage info | 20 | lcov --directory . --capture --output-file coverage.info # capture coverage info |
| 11 | lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info # filter out system | 21 | lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info # filter out system |
| 12 | lcov --list coverage.info #debug info | 22 | lcov --list coverage.info #debug info |
| 13 | # Uploading report to CodeCov | 23 | # Uploading report to CodeCov |
| 14 | bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" | 24 | bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" |
| 25 | + | ||
| 26 | +set +evx | ||
| 27 | +echo -en "travis_fold:end:script.lcov\\r" |
.ci/travis.sh deleted
| 1 | -#!/usr/bin/env sh | ||
| 2 | -set -evx | ||
| 3 | - | ||
| 4 | -mkdir build || true | ||
| 5 | -cd build | ||
| 6 | -cmake .. -DCLI_CXX_STD=11 -DCLI_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug | ||
| 7 | -cmake --build . -- -j2 | ||
| 8 | -ctest --output-on-failure | ||
| 9 | -if [ -n "$CLI_CXX_STD" ] && [ "$CLI_CXX_STD" -ge "14" ] ; then | ||
| 10 | - cmake .. -DCLI_CXX_STD=14 -DCLI_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug | ||
| 11 | - cmake --build . -- -j2 | ||
| 12 | - ctest --output-on-failure | ||
| 13 | -fi | ||
| 14 | -if [ -n "$CLI_CXX_STD" ] && [ "$CLI_CXX_STD" -ge "17" ] ; then | ||
| 15 | - cmake .. -DCLI_CXX_STD=17 -DCLI_SINGLE_FILE_TESTS=ON -DCMAKE_BUILD_TYPE=Debug | ||
| 16 | - cmake --build . -- -j2 | ||
| 17 | - ctest --output-on-failure | ||
| 18 | -fi | ||
| 19 | - | ||
| 20 | -set +evx |
.travis.yml
| 1 | language: cpp | 1 | language: cpp |
| 2 | sudo: false | 2 | sudo: false |
| 3 | dist: trusty | 3 | dist: trusty |
| 4 | + | ||
| 5 | +# Exclude ghpages, | ||
| 6 | +# but even better, don't build branch and PR, just PR | ||
| 4 | branches: | 7 | branches: |
| 5 | - exclude: | ||
| 6 | - - gh-pages | 8 | + only: |
| 9 | + - master | ||
| 10 | + | ||
| 7 | cache: | 11 | cache: |
| 12 | + ccache: true | ||
| 13 | + apt: true | ||
| 8 | directories: | 14 | directories: |
| 9 | - - "${TRAVIS_BUILD_DIR}/deps/cmake" | ||
| 10 | - "${TRAVIS_BUILD_DIR}/deps/doxygen" | 15 | - "${TRAVIS_BUILD_DIR}/deps/doxygen" |
| 16 | + | ||
| 11 | matrix: | 17 | matrix: |
| 12 | include: | 18 | include: |
| 19 | + # Default clang | ||
| 13 | - compiler: clang | 20 | - compiler: clang |
| 14 | - addons: | ||
| 15 | - apt: | ||
| 16 | - sources: | ||
| 17 | - - ubuntu-toolchain-r-test | ||
| 18 | - - llvm-toolchain-trusty-5.0 | ||
| 19 | - packages: | ||
| 20 | - - clang++-5.0 | ||
| 21 | - env: | ||
| 22 | - - COMPILER=5.0 | ||
| 23 | - - CLI_CXX_STD=14 | ||
| 24 | - - compiler: clang | ||
| 25 | - addons: | ||
| 26 | - apt: | ||
| 27 | - packages: | ||
| 28 | - - clang-3.9 | ||
| 29 | - - clang-format-3.9 | ||
| 30 | - - clang-tidy-3.9 | ||
| 31 | - env: | ||
| 32 | - - COMPILER=3.9 | ||
| 33 | - - CLI_CXX_STD=14 | 21 | + |
| 22 | + # Check style/tidy | ||
| 23 | + - compiler: clang | ||
| 34 | script: | 24 | script: |
| 35 | - cd "${TRAVIS_BUILD_DIR}" | 25 | - cd "${TRAVIS_BUILD_DIR}" |
| 36 | - scripts/check_style.sh | 26 | - scripts/check_style.sh |
| 37 | - - ".ci/check_tidy.sh" | 27 | + - .ci/check_tidy.sh |
| 28 | + | ||
| 29 | + # Docs and clang 3.5 | ||
| 38 | - compiler: clang | 30 | - compiler: clang |
| 31 | + env: | ||
| 32 | + - DEPLOYMAT=yes | ||
| 39 | addons: | 33 | addons: |
| 40 | apt: | 34 | apt: |
| 41 | packages: | 35 | packages: |
| 42 | - clang-3.5 | 36 | - clang-3.5 |
| 43 | - env: | ||
| 44 | - - COMPILER=3.5 | ||
| 45 | - - DEPLOY_MAT=yes | ||
| 46 | - - DOXYFILE=$TRAVIS_BUILD_DIR/docs/Doxyfile | 37 | + install: |
| 38 | + - export CC=clang-3.5 | ||
| 39 | + - export CXX=clang++-3.5 | ||
| 40 | + script: | ||
| 41 | + - .ci/make_and_test.sh 11 | ||
| 47 | after_success: | 42 | after_success: |
| 43 | + - export DOXYFILE=$TRAVIS_BUILD_DIR/docs/Doxyfile | ||
| 48 | - | | 44 | - | |
| 49 | if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] | 45 | if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] |
| 50 | then | 46 | then |
| 51 | - echo "Updating docs" && cd $TRAVIS_BUILD_DIR && .ci/build_docs.sh | 47 | + . .ci/build_doxygen.sh |
| 48 | + .ci/build_docs.sh | ||
| 52 | fi | 49 | fi |
| 50 | + | ||
| 51 | + # GCC 6 and Coverage | ||
| 53 | - compiler: gcc | 52 | - compiler: gcc |
| 54 | addons: | 53 | addons: |
| 55 | apt: | 54 | apt: |
| @@ -59,24 +58,27 @@ matrix: | @@ -59,24 +58,27 @@ matrix: | ||
| 59 | - g++-6 | 58 | - g++-6 |
| 60 | - curl | 59 | - curl |
| 61 | - lcov | 60 | - lcov |
| 62 | - env: | ||
| 63 | - - COMPILER=6 | ||
| 64 | - - CLI_CXX_STD=14 | ||
| 65 | - before_install: | 61 | + install: |
| 62 | + - export CC=gcc-6 | ||
| 63 | + - export CXX=g++-6 | ||
| 66 | - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" | 64 | - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" |
| 67 | - cd $TRAVIS_BUILD_DIR | 65 | - cd $TRAVIS_BUILD_DIR |
| 68 | - ". .ci/build_lcov.sh" | 66 | - ". .ci/build_lcov.sh" |
| 69 | - ".ci/run_codecov.sh" | 67 | - ".ci/run_codecov.sh" |
| 68 | + | ||
| 69 | + # GCC 4.7 and Conan | ||
| 70 | - compiler: gcc | 70 | - compiler: gcc |
| 71 | addons: | 71 | addons: |
| 72 | apt: | 72 | apt: |
| 73 | packages: | 73 | packages: |
| 74 | - g++-4.7 | 74 | - g++-4.7 |
| 75 | - env: | ||
| 76 | - - COMPILER=4.7 | ||
| 77 | - before_install: | 75 | + install: |
| 76 | + - export CC=gcc-4.7 | ||
| 77 | + - export CXX=g++-4.7 | ||
| 78 | - python -m pip install --user conan | 78 | - python -m pip install --user conan |
| 79 | - conan user | 79 | - conan user |
| 80 | + script: | ||
| 81 | + - .ci/make_and_test.sh 11 | ||
| 80 | after_success: | 82 | after_success: |
| 81 | - conan create . CLIUtils/stable | 83 | - conan create . CLIUtils/stable |
| 82 | - | | 84 | - | |
| @@ -86,33 +88,28 @@ matrix: | @@ -86,33 +88,28 @@ matrix: | ||
| 86 | conan user -p ${BINFROG_API_KEY} -r origin henryiii | 88 | conan user -p ${BINFROG_API_KEY} -r origin henryiii |
| 87 | conan upload "*" -c -r origin --all | 89 | conan upload "*" -c -r origin --all |
| 88 | fi | 90 | fi |
| 91 | + | ||
| 92 | + # macOS and clang | ||
| 89 | - os: osx | 93 | - os: osx |
| 90 | compiler: clang | 94 | compiler: clang |
| 91 | - before_install: | 95 | + install: |
| 92 | - brew update | 96 | - brew update |
| 93 | - echo 'brew "python"' > Brewfile | 97 | - echo 'brew "python"' > Brewfile |
| 94 | - echo 'brew "conan"' >> Brewfile | 98 | - echo 'brew "conan"' >> Brewfile |
| 99 | + - echo 'brew "ccache"' >> Brewfile | ||
| 95 | - brew bundle | 100 | - brew bundle |
| 96 | - python -m ensurepip --user | 101 | - python -m ensurepip --user |
| 97 | - conan user | 102 | - conan user |
| 98 | after_success: | 103 | after_success: |
| 99 | - conan create . CLIUtils/CLI11 | 104 | - conan create . CLIUtils/CLI11 |
| 100 | -install: | ||
| 101 | -- python -c 'import sys; print(sys.version_info[:])' | ||
| 102 | -- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" | ||
| 103 | -- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd $TRAVIS_BUILD_DIR && . .ci/prepare_altern.sh | ||
| 104 | - ; fi | ||
| 105 | -- if [ "$TRAVIS_OS_NAME" = "linux" ] ; then cd $TRAVIS_BUILD_DIR && . .ci/build_cmake.sh | ||
| 106 | - ; fi | ||
| 107 | -- if [ "$TRAVIS_OS_NAME" = "linux" ] ; then cd $TRAVIS_BUILD_DIR && . .ci/build_doxygen.sh | ||
| 108 | - ; fi | ||
| 109 | -- cd "${DEPS_DIR}" | ||
| 110 | -- if [ "$(python -c 'import sys; print(sys.version_info[0])')" = "2" ] ; then python | ||
| 111 | - -m pip install --user pathlib ; fi | ||
| 112 | -- cmake --version | 105 | + |
| 106 | +install: skip | ||
| 107 | + | ||
| 113 | script: | 108 | script: |
| 114 | -- cd "${TRAVIS_BUILD_DIR}" | ||
| 115 | -- ".ci/travis.sh" | 109 | +- .ci/make_and_test.sh 11 |
| 110 | +- .ci/make_and_test.sh 14 | ||
| 111 | + | ||
| 112 | + | ||
| 116 | deploy: | 113 | deploy: |
| 117 | provider: releases | 114 | provider: releases |
| 118 | api_key: | 115 | api_key: |