Try and fix multiline commands.
This commit is contained in:
parent
afbb2f296d
commit
251cf54ba8
68
.travis.yml
68
.travis.yml
|
|
@ -40,52 +40,52 @@ addons:
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- |
|
- |
|
||||||
if [ "$BUILD_UNIT_TESTS" ]; then
|
if [ "${BUILD_UNIT_TESTS}" ]; then
|
||||||
# GCov 4.6 cannot handle the file structure
|
# GCov 4.6 cannot handle the file structure
|
||||||
export CXX="g++-4.8"
|
export CXX="g++-4.8"
|
||||||
export GCOV="gcov-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/)
|
# 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"
|
export LCOV_ROOT="$HOME/lcov"
|
||||||
mkdir -p "$LCOV_ROOT"
|
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"
|
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
|
tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
|
||||||
export PATH="$LCOV_ROOT/bin:$PATH"
|
export PATH="$LCOV_ROOT/bin:$PATH"
|
||||||
which lcov
|
which lcov
|
||||||
|
|
||||||
# Install coveralls tool
|
# Install coveralls tool
|
||||||
gem install coveralls-lcov
|
gem install coveralls-lcov
|
||||||
export GENERATE_COVERAGE=1
|
export GENERATE_COVERAGE=1
|
||||||
else
|
else
|
||||||
# Install PlatformIO
|
# Install PlatformIO
|
||||||
pip install -U platformio
|
pip install -U platformio
|
||||||
fi
|
fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Build unit tests & generate code coverage
|
# Build unit tests & generate code coverage
|
||||||
- |
|
- |
|
||||||
if [ "${BUILD_UNIT_TESTS}" ]; then
|
if [ "${BUILD_UNIT_TESTS}" ]; then
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" ..
|
cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" ..
|
||||||
make all
|
make all
|
||||||
ctest --verbose
|
ctest --verbose
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build current example
|
# Build current example
|
||||||
- |
|
- |
|
||||||
if [ ! "${BUILD_UNIT_TESTS}" ]; then
|
if [ ! "${BUILD_UNIT_TESTS}" ]; then
|
||||||
platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo"
|
platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
if [ "${GENERATE_COVERAGE}" ]; then
|
if [ "${GENERATE_COVERAGE}" ]; then
|
||||||
# Generate code coverage information & send to Coveralls
|
# Generate code coverage information & send to Coveralls
|
||||||
lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
|
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 --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
|
||||||
lcov --list coverage.info
|
lcov --list coverage.info
|
||||||
coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
|
coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
|
||||||
fi
|
fi
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue