From d8350c7e5abcbac68f68fe0d2cdec63b447dd08e Mon Sep 17 00:00:00 2001 From: jgromes Date: Wed, 31 Jul 2019 09:38:04 +0200 Subject: [PATCH] Travis fix for ESP8266 --- .travis.yml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9b406320..4f79c647 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,17 +39,34 @@ branches: - master script: + # set sketch skipping pattern for some boards + if [[ "$BOARD" =~ "esp8266:esp8266:" ]]; then + # on ESP8266, skip HTTP and MQTT examples + SKIP_PAT='(HTTP|MQTT).*ino' + else + # default skip pattern (matches everything) + SKIP_PAT='.*' + fi + # build all example sketches - for example in $(find $PWD/examples -name '*.ino' | sort); do - echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m"; - arduino --verify --board $BOARD $example; - if [ $? -ne 0 ]; then - echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n"; - exit 1; + # check whether to skip this sketch + if [[ ${example} =~ $PAT2 ]]; then + # skip sketch + echo -e "\n\033[1;33mSkipped ${example##*/} (matched with $SKIP_PAT)\033[0m"; else - echo -e "\033[1;32m${example##*/} build PASSED\033[0m\n"; + # build sketch + echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m"; + arduino --verify --board $BOARD $example; + if [ $? -ne 0 ]; then + echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n"; + exit 1; + else + echo -e "\033[1;32m${example##*/} build PASSED\033[0m\n"; + fi fi done + # generate Doxygen documentation (only for Arduino UNO) - if [ $BOARD = "arduino:avr:uno" ]; then sudo apt-get update;