Add Werror, etc. to CI process (#779)
This commit is contained in:
1 parent
1255a4240a
commit
c19a6153c9
3 files changed
+19
-9
No files matched your search
+9
-1
@@ -6,6 +6,7 @@ set -o pipefail
|
||||
outdir=$1; shift
|
||||
offset=$1; shift
|
||||
fqbn=$1; shift
|
||||
werror=$1; shift
|
||||
|
||||
mkdir $outdir
|
||||
rm -f *.elf
|
||||
@@ -17,7 +18,14 @@ sketches=$(find ~/Arduino/libraries/ESP8266Audio/examples -name "*.ino" | sort |
|
||||
while [ $(echo $sketches | wc -w) -gt 0 ]; do
|
||||
sketch=$(echo $sketches | cut -f1 -d " ")
|
||||
echo "::group::Compiling $(basename $sketch) for $fqbn into $outdir"
|
||||
./arduino-cli compile -b "$fqbn" -v --warnings all --build-path "$outdir" "$sketch" || exit 255
|
||||
if [ 0"$werror" -gt 0 ]; then
|
||||
./arduino-cli compile -b "$fqbn" -v --warnings all \
|
||||
--build-property "compiler.c.extra_flags=-Wall -Wextra -Werror -Wno-ignored-qualifiers" \
|
||||
--build-property "compiler.cpp.extra_flags=-Wall -Wextra -Werror -Wno-ignored-qualifiers -Wno-overloaded-virtual" \
|
||||
--build-path "$outdir" "$sketch" || exit 255
|
||||
else
|
||||
./arduino-cli compile -b "$fqbn" -v --warnings all --build-path "$outdir" "$sketch" || exit 255
|
||||
fi
|
||||
mv -f "$outdir"/*.elf .
|
||||
echo "::endgroup::"
|
||||
# Shift out 5
|
||||
|
||||
Reference in new issue
Block a user