diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..04c8130 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,54 @@ +name: ESP Async Web Server CI + +on: + push: + branches: + - master + - release/* + pull_request: + +jobs: + + build-arduino-esp32: + name: Build Arduino ESP32 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Build Tests + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + run: bash $TRAVIS_BUILD_DIR/travis/build.sh esp32 + + build-arduino-esp8266: + name: Build Arduino ESP8266 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Build Tests + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + run: bash $TRAVIS_BUILD_DIR/travis/build.sh esp8266 + + build-pio-esp32: + name: Build PlatformIO ESP32 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Python Wheel + run: pip install wheel + - name: Build Tests + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + run: bash $TRAVIS_BUILD_DIR/travis/build-pio.sh esp32dev + + build-pio-esp8266: + name: Build PlatformIO ESP8266 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Python Wheel + run: pip install wheel + - name: Build Tests + env: + TRAVIS_BUILD_DIR: ${{ github.workspace }} + run: bash $TRAVIS_BUILD_DIR/travis/build-pio.sh esp12e diff --git a/travis/build-pio.sh b/travis/build-pio.sh index ff43351..e2a3f3d 100644 --- a/travis/build-pio.sh +++ b/travis/build-pio.sh @@ -4,21 +4,28 @@ BOARD=$1 echo -e "travis_fold:start:install_pio" pip install -U platformio +if [ $? -ne 0 ]; then exit 1; fi -platformio lib install https://github.com/bblanchon/ArduinoJson.git +python -m platformio lib --storage-dir $PWD +if [ $? -ne 0 ]; then exit 1; fi + +python -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git +if [ $? -ne 0 ]; then exit 1; fi case $BOARD in esp32dev) - platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git + python -m 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 + python -m platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git || true ;; esac +if [ $? -ne 0 ]; then exit 1; fi 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 + python -m platformio ci $EXAMPLE -l '.' -b $BOARD + if [ $? -ne 0 ]; then exit 1; fi done echo -e "travis_fold:end:test_pio"