Skip to content

Commit 7719a52

Browse files
authored
Merge pull request #21 from thijstriemstra/patch-2
ci: build with platformio and github actions
2 parents c52d974 + 57aa1e5 commit 7719a52

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/main.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PlatformIO CI
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
example: [examples/Ex_01_SayHello/Ex_01_SayHello.ino, examples/Ex_02_MultiBlink/Ex_02_MultiBlink.ino]
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Cache pip
16+
uses: actions/cache@v2
17+
with:
18+
path: ~/.cache/pip
19+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
20+
restore-keys: ${{ runner.os }}-pip-
21+
- name: Cache PlatformIO
22+
uses: actions/cache@v2
23+
with:
24+
path: ~/.platformio
25+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
- name: Install PlatformIO
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install --upgrade platformio
32+
- name: Install library dependencies
33+
run: pio lib -g install 667
34+
- name: Run PlatformIO
35+
run: pio ci --lib="." --board=uno --board=d1_mini
36+
env:
37+
PLATFORMIO_CI_SRC: ${{ matrix.example }}

0 commit comments

Comments
 (0)