Skip to content

Commit 940b87e

Browse files
committed
Add examples workflow
1 parent 6a671ee commit 940b87e

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build examples
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
board:
13+
- "nodemcuv2"
14+
- "lolin32"
15+
example:
16+
- "examples/ESPEssentials.ino"
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Cache pip
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.cache/pip
24+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
25+
restore-keys: ${{ runner.os }}-pip-
26+
- name: Cache PlatformIO
27+
uses: actions/cache@v2
28+
with:
29+
path: ~/.platformio
30+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
31+
- name: Set up Python
32+
uses: actions/setup-python@v2
33+
- name: Install PlatformIO
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install --upgrade platformio
37+
- name: Install 3rd party dependencies
38+
run: |
39+
pio lib -g install \
40+
https://github.com/tzapu/WiFiManager \
41+
https://github.com/stnkl/ESPEssentials
42+
- name: Run PlatformIO examples
43+
run: pio ci --board=${{ matrix.board }}
44+
env:
45+
PLATFORMIO_CI_SRC: ${{ matrix.example }}

0 commit comments

Comments
 (0)