[Travis] Updated script to match new examples structure

This commit is contained in:
jgromes 2019-02-10 10:21:27 +01:00
parent eb659812c9
commit b4eb421553

View file

@ -18,14 +18,13 @@ install:
- ln -s $PWD $HOME/Arduino/libraries/RadioLib
script:
# build all example sketches
- cd examples
- for d in */ ; do
echo -e "\n\033[1;33mBuilding ${d%/} ... \033[0m";
arduino --verify --board $BOARD $PWD/${d%/}/${d%/}.ino;
- for example in $(find $PWD/examples -name '*.ino'); do
echo -e "\n\033[1;33mBuilding $example ... \033[0m";
arduino --verify --board $BOARD $example;
if [ $? -ne 0 ]; then
echo -e "\033[1;31m${d%/} build FAILED\033[0m\n";
echo -e "\033[1;31m$example build FAILED\033[0m\n";
exit 1;
else
echo -e "\033[1;32m${d%/} build PASSED\033[0m\n";
echo -e "\033[1;32m$example build PASSED\033[0m\n";
fi
done