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
.ci/build_lcov.sh
.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 | 5 | set -evx |
| 3 | 6 | |
| 4 | -mkdir build-tidy || true | |
| 7 | +mkdir -p build-tidy | |
| 5 | 8 | cd build-tidy |
| 6 | 9 | CXX_FLAGS="-Werror -Wall -Wextra -pedantic -std=c++11" cmake .. -DCLANG_TIDY_FIX=ON |
| 7 | 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 | 18 | git diff --exit-code --color |
| 10 | 19 | |
| 11 | 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 | 5 | set -evx |
| 2 | 6 | |
| 3 | 7 | cd ${TRAVIS_BUILD_DIR} |
| ... | ... | @@ -7,8 +11,17 @@ cmake .. -DCLI_SINGLE_FILE_TESTS=OFF -DCLI_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Cover |
| 7 | 11 | cmake --build . -- -j2 |
| 8 | 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 | 20 | lcov --directory . --capture --output-file coverage.info # capture coverage info |
| 11 | 21 | lcov --remove coverage.info '*/tests/*' '*/examples/*' '*gtest*' '*gmock*' '/usr/*' --output-file coverage.info # filter out system |
| 12 | 22 | lcov --list coverage.info #debug info |
| 13 | 23 | # Uploading report to CodeCov |
| 14 | 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 | 1 | language: cpp |
| 2 | 2 | sudo: false |
| 3 | 3 | dist: trusty |
| 4 | + | |
| 5 | +# Exclude ghpages, | |
| 6 | +# but even better, don't build branch and PR, just PR | |
| 4 | 7 | branches: |
| 5 | - exclude: | |
| 6 | - - gh-pages | |
| 8 | + only: | |
| 9 | + - master | |
| 10 | + | |
| 7 | 11 | cache: |
| 12 | + ccache: true | |
| 13 | + apt: true | |
| 8 | 14 | directories: |
| 9 | - - "${TRAVIS_BUILD_DIR}/deps/cmake" | |
| 10 | 15 | - "${TRAVIS_BUILD_DIR}/deps/doxygen" |
| 16 | + | |
| 11 | 17 | matrix: |
| 12 | 18 | include: |
| 19 | + # Default clang | |
| 13 | 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 | 24 | script: |
| 35 | 25 | - cd "${TRAVIS_BUILD_DIR}" |
| 36 | 26 | - scripts/check_style.sh |
| 37 | - - ".ci/check_tidy.sh" | |
| 27 | + - .ci/check_tidy.sh | |
| 28 | + | |
| 29 | + # Docs and clang 3.5 | |
| 38 | 30 | - compiler: clang |
| 31 | + env: | |
| 32 | + - DEPLOYMAT=yes | |
| 39 | 33 | addons: |
| 40 | 34 | apt: |
| 41 | 35 | packages: |
| 42 | 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 | 42 | after_success: |
| 43 | + - export DOXYFILE=$TRAVIS_BUILD_DIR/docs/Doxyfile | |
| 48 | 44 | - | |
| 49 | 45 | if [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ] |
| 50 | 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 | 49 | fi |
| 50 | + | |
| 51 | + # GCC 6 and Coverage | |
| 53 | 52 | - compiler: gcc |
| 54 | 53 | addons: |
| 55 | 54 | apt: |
| ... | ... | @@ -59,24 +58,27 @@ matrix: |
| 59 | 58 | - g++-6 |
| 60 | 59 | - curl |
| 61 | 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 | 64 | - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps" |
| 67 | 65 | - cd $TRAVIS_BUILD_DIR |
| 68 | 66 | - ". .ci/build_lcov.sh" |
| 69 | 67 | - ".ci/run_codecov.sh" |
| 68 | + | |
| 69 | + # GCC 4.7 and Conan | |
| 70 | 70 | - compiler: gcc |
| 71 | 71 | addons: |
| 72 | 72 | apt: |
| 73 | 73 | packages: |
| 74 | 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 | 78 | - python -m pip install --user conan |
| 79 | 79 | - conan user |
| 80 | + script: | |
| 81 | + - .ci/make_and_test.sh 11 | |
| 80 | 82 | after_success: |
| 81 | 83 | - conan create . CLIUtils/stable |
| 82 | 84 | - | |
| ... | ... | @@ -86,33 +88,28 @@ matrix: |
| 86 | 88 | conan user -p ${BINFROG_API_KEY} -r origin henryiii |
| 87 | 89 | conan upload "*" -c -r origin --all |
| 88 | 90 | fi |
| 91 | + | |
| 92 | + # macOS and clang | |
| 89 | 93 | - os: osx |
| 90 | 94 | compiler: clang |
| 91 | - before_install: | |
| 95 | + install: | |
| 92 | 96 | - brew update |
| 93 | 97 | - echo 'brew "python"' > Brewfile |
| 94 | 98 | - echo 'brew "conan"' >> Brewfile |
| 99 | + - echo 'brew "ccache"' >> Brewfile | |
| 95 | 100 | - brew bundle |
| 96 | 101 | - python -m ensurepip --user |
| 97 | 102 | - conan user |
| 98 | 103 | after_success: |
| 99 | 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 | 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 | 113 | deploy: |
| 117 | 114 | provider: releases |
| 118 | 115 | api_key: | ... | ... |