Skip to content

Commit 8771822

Browse files
authored
Merge pull request #68 from per1234/ci-fail-on-warning
Fail Travis CI build on compiler warnings
2 parents 2b190e8 + f43c0fb commit 8771822

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ language: generic
22
env:
33
global:
44
- CLI_VERSION=latest
5+
- EXTRA_COMPILER_WARNING_FLAGS="-Wpedantic -Werror"
56
matrix:
67
include:
78
- env:
@@ -60,8 +61,8 @@ before_install:
6061
- arduino-cli lib install WiFi101
6162
- arduino-cli lib install WiFiNINA
6263
- arduino-cli lib install Ethernet
63-
- buildExampleSketch() { arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/$1; }
64-
- buildExampleUtilitySketch() { arduino-cli compile --warnings all --fqbn $BOARD $PWD/examples/utility/$1; }
64+
- buildExampleSketch() { arduino-cli compile --warnings all --build-properties compiler.c.extra_flags="${EXTRA_COMPILER_WARNING_FLAGS}" --build-properties compiler.cpp.extra_flags="${EXTRA_COMPILER_WARNING_FLAGS}" --build-properties compiler.S.extra_flags="${EXTRA_COMPILER_WARNING_FLAGS}" --fqbn $BOARD $PWD/examples/$1; }
65+
- buildExampleUtilitySketch() { arduino-cli compile --warnings all --build-properties compiler.c.extra_flags="${EXTRA_COMPILER_WARNING_FLAGS}" --build-properties compiler.cpp.extra_flags="${EXTRA_COMPILER_WARNING_FLAGS}" --build-properties compiler.S.extra_flags="${EXTRA_COMPILER_WARNING_FLAGS}" --fqbn $BOARD $PWD/examples/utility/$1; }
6566
install:
6667
- mkdir -p $HOME/Arduino/libraries
6768
- ln -s $PWD $HOME/Arduino/libraries/.

0 commit comments

Comments
 (0)