diff --git a/.travis.yml b/.travis.yml index 204ffe3..fd1f747 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,6 +24,16 @@ jobs: stage: build script: bash $TRAVIS_BUILD_DIR/travis/build.sh esp8266 + - name: "Build Platformio ESP32" + if: tag IS blank AND (type = pull_request OR (type = push AND branch = master)) + stage: build + script: bash $TRAVIS_BUILD_DIR/travis/build-pio.sh esp32dev + + - name: "Build Platformio ESP8266" + if: tag IS blank AND (type = pull_request OR (type = push AND branch = master)) + stage: build + script: bash $TRAVIS_BUILD_DIR/travis/build-pio.sh esp12e + notifications: email: on_success: change diff --git a/travis/build-pio.sh b/travis/build-pio.sh new file mode 100644 index 0000000..ff43351 --- /dev/null +++ b/travis/build-pio.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +BOARD=$1 + +echo -e "travis_fold:start:install_pio" +pip install -U platformio + +platformio lib install https://github.com/bblanchon/ArduinoJson.git + +case $BOARD in +esp32dev) + platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git + ;; +esp12e) + platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git || true + ;; +esac +echo -e "travis_fold:end:install_pio" + +echo -e "travis_fold:start:test_pio" +for EXAMPLE in $PWD/examples/*/*.ino; do + platformio ci $EXAMPLE -l '.' -b $BOARD +done +echo -e "travis_fold:end:test_pio"