Setup Github CI (#599)
* Setup Github CI * Update main.yml * Update build-pio.sh * Add error checks to PIO script * Update build-pio.sh
This commit is contained in:
parent
0769521ef8
commit
41cf4893c6
|
@ -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
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue