Skip to content

Commit 251cf54

Browse files
author
Francois Best
committed
Try and fix multiline commands.
1 parent afbb2f2 commit 251cf54

File tree

1 file changed

+34
-34
lines changed

1 file changed

+34
-34
lines changed

.travis.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,52 +40,52 @@ addons:
4040

4141
install:
4242
- |
43-
if [ "$BUILD_UNIT_TESTS" ]; then
44-
# GCov 4.6 cannot handle the file structure
45-
export CXX="g++-4.8"
46-
export GCOV="gcov-4.8"
43+
if [ "${BUILD_UNIT_TESTS}" ]; then
44+
# GCov 4.6 cannot handle the file structure
45+
export CXX="g++-4.8"
46+
export GCOV="gcov-4.8"
4747
48-
# Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
49-
export LCOV_ROOT="$HOME/lcov"
50-
mkdir -p "$LCOV_ROOT"
51-
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz"
52-
tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
53-
export PATH="$LCOV_ROOT/bin:$PATH"
54-
which lcov
48+
# Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
49+
export LCOV_ROOT="$HOME/lcov"
50+
mkdir -p "$LCOV_ROOT"
51+
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz"
52+
tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
53+
export PATH="$LCOV_ROOT/bin:$PATH"
54+
which lcov
5555
56-
# Install coveralls tool
57-
gem install coveralls-lcov
58-
export GENERATE_COVERAGE=1
59-
else
60-
# Install PlatformIO
61-
pip install -U platformio
62-
fi
56+
# Install coveralls tool
57+
gem install coveralls-lcov
58+
export GENERATE_COVERAGE=1
59+
else
60+
# Install PlatformIO
61+
pip install -U platformio
62+
fi
6363
6464
script:
6565
# Build unit tests & generate code coverage
6666
- |
67-
if [ "${BUILD_UNIT_TESTS}" ]; then
68-
mkdir build && cd build
69-
cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" ..
70-
make all
71-
ctest --verbose
72-
fi
67+
if [ "${BUILD_UNIT_TESTS}" ]; then
68+
mkdir build && cd build
69+
cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBUILDER_ENABLE_PROFILING=${GENERATE_COVERAGE} --generator="Unix Makefiles" ..
70+
make all
71+
ctest --verbose
72+
fi
7373
7474
# Build current example
7575
- |
76-
if [ ! "${BUILD_UNIT_TESTS}" ]; then
77-
platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo"
78-
fi
76+
if [ ! "${BUILD_UNIT_TESTS}" ]; then
77+
platformio ci --lib="." --board=uno --board="due" --board="zero" --board="leonardo"
78+
fi
7979
8080
after_success:
8181
- |
82-
if [ "${GENERATE_COVERAGE}" ]; then
83-
# Generate code coverage information & send to Coveralls
84-
lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
85-
lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
86-
lcov --list coverage.info
87-
coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
88-
fi
82+
if [ "${GENERATE_COVERAGE}" ]; then
83+
# Generate code coverage information & send to Coveralls
84+
lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
85+
lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
86+
lcov --list coverage.info
87+
coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
88+
fi
8989
9090
notifications:
9191
email: false

0 commit comments

Comments
 (0)