From 251cf54ba894ba769b31bcf70358ece314d53117 Mon Sep 17 00:00:00 2001 From: Francois Best Date: Tue, 1 Nov 2016 23:53:28 +0100 Subject: [PATCH] Try and fix multiline commands. --- .travis.yml | 68 ++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45e5d8e..2d8f9e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,52 +40,52 @@ addons: install: - | - if [ "$BUILD_UNIT_TESTS" ]; then - # GCov 4.6 cannot handle the file structure - export CXX="g++-4.8" - export GCOV="gcov-4.8" + if [ "${BUILD_UNIT_TESTS}" ]; then + # GCov 4.6 cannot handle the file structure + export CXX="g++-4.8" + export GCOV="gcov-4.8" - # Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/) - export LCOV_ROOT="$HOME/lcov" - mkdir -p "$LCOV_ROOT" - wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz" - tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT - export PATH="$LCOV_ROOT/bin:$PATH" - which lcov + # Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/) + export LCOV_ROOT="$HOME/lcov" + mkdir -p "$LCOV_ROOT" + wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz" + tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT + export PATH="$LCOV_ROOT/bin:$PATH" + which lcov - # Install coveralls tool - gem install coveralls-lcov - export GENERATE_COVERAGE=1 - else - # Install PlatformIO - pip install -U platformio - fi + # Install coveralls tool + gem install coveralls-lcov + export GENERATE_COVERAGE=1 + else + # Install PlatformIO + pip install -U platformio + fi script: # Build unit tests & generate code coverage - | - if [ "${BUILD_UNIT_TESTS}" ]; then - mkdir build && cd build - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" .. - make all - ctest --verbose - fi + if [ "${BUILD_UNIT_TESTS}" ]; then + mkdir build && cd build + cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" .. + make all + ctest --verbose + fi # Build current example - | - if [ ! "${BUILD_UNIT_TESTS}" ]; then - platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo" - fi + if [ ! "${BUILD_UNIT_TESTS}" ]; then + platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo" + fi after_success: - | - if [ "${GENERATE_COVERAGE}" ]; then - # Generate code coverage information & send to Coveralls - lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info - lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info - lcov --list coverage.info - coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info - fi + if [ "${GENERATE_COVERAGE}" ]; then + # Generate code coverage information & send to Coveralls + lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info + lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info + lcov --list coverage.info + coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info + fi notifications: email: false