Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 41cf489

Browse files
authored
Setup Github CI (#599)
* Setup Github CI * Update main.yml * Update build-pio.sh * Add error checks to PIO script * Update build-pio.sh
1 parent 0769521 commit 41cf489

File tree

2 files changed

+65
-4
lines changed

2 files changed

+65
-4
lines changed

.github/workflows/main.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: ESP Async Web Server CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- release/*
8+
pull_request:
9+
10+
jobs:
11+
12+
build-arduino-esp32:
13+
name: Build Arduino ESP32
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Build Tests
18+
env:
19+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
20+
run: bash $TRAVIS_BUILD_DIR/travis/build.sh esp32
21+
22+
build-arduino-esp8266:
23+
name: Build Arduino ESP8266
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v1
27+
- name: Build Tests
28+
env:
29+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
30+
run: bash $TRAVIS_BUILD_DIR/travis/build.sh esp8266
31+
32+
build-pio-esp32:
33+
name: Build PlatformIO ESP32
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v1
37+
- name: Install Python Wheel
38+
run: pip install wheel
39+
- name: Build Tests
40+
env:
41+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
42+
run: bash $TRAVIS_BUILD_DIR/travis/build-pio.sh esp32dev
43+
44+
build-pio-esp8266:
45+
name: Build PlatformIO ESP8266
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v1
49+
- name: Install Python Wheel
50+
run: pip install wheel
51+
- name: Build Tests
52+
env:
53+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
54+
run: bash $TRAVIS_BUILD_DIR/travis/build-pio.sh esp12e

travis/build-pio.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,28 @@ BOARD=$1
44

55
echo -e "travis_fold:start:install_pio"
66
pip install -U platformio
7+
if [ $? -ne 0 ]; then exit 1; fi
78

8-
platformio lib install https://github.com/bblanchon/ArduinoJson.git
9+
python -m platformio lib --storage-dir $PWD
10+
if [ $? -ne 0 ]; then exit 1; fi
11+
12+
python -m platformio lib -g install https://github.com/bblanchon/ArduinoJson.git
13+
if [ $? -ne 0 ]; then exit 1; fi
914

1015
case $BOARD in
1116
esp32dev)
12-
platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git
17+
python -m platformio lib -g install https://github.com/me-no-dev/AsyncTCP.git
1318
;;
1419
esp12e)
15-
platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git || true
20+
python -m platformio lib -g install https://github.com/me-no-dev/ESPAsyncTCP.git || true
1621
;;
1722
esac
23+
if [ $? -ne 0 ]; then exit 1; fi
1824
echo -e "travis_fold:end:install_pio"
1925

2026
echo -e "travis_fold:start:test_pio"
2127
for EXAMPLE in $PWD/examples/*/*.ino; do
22-
platformio ci $EXAMPLE -l '.' -b $BOARD
28+
python -m platformio ci $EXAMPLE -l '.' -b $BOARD
29+
if [ $? -ne 0 ]; then exit 1; fi
2330
done
2431
echo -e "travis_fold:end:test_pio"

0 commit comments

Comments
 (0)