Skip to content

Commit 56eda63

Browse files
committed
Update github actions workflows
1 parent 5a51c7d commit 56eda63

File tree

3 files changed

+110
-5
lines changed

3 files changed

+110
-5
lines changed

.github/workflows/arduino_lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Arduino lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: arduino/arduino-lint-action@v1
11+
with:
12+
library-manager: update

.github/workflows/build.yml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,50 @@
1+
name: Build library
2+
13
on: [push, pull_request]
4+
25
jobs:
3-
lint:
6+
build:
7+
48
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
board:
13+
- "nodemcuv2"
14+
- "lolin32"
15+
516
steps:
6-
- uses: actions/checkout@v2
7-
- uses: arduino/arduino-lint-action@v1
8-
with:
9-
library-manager: update
17+
- uses: actions/checkout@v2
18+
- name: Cache pip
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.cache/pip
22+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
23+
restore-keys: ${{ runner.os }}-pip-
24+
- name: Cache PlatformIO
25+
uses: actions/cache@v2
26+
with:
27+
path: ~/.platformio
28+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
29+
- name: Set up Python
30+
uses: actions/setup-python@v2
31+
- name: Install PlatformIO
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install --upgrade platformio
35+
- name: Install 3rd party dependencies
36+
run: |
37+
pio lib install \
38+
ArduinoJson \
39+
FastLED \
40+
LinkedList \
41+
WebSockets \
42+
https://github.com/tzapu/WiFiManager \
43+
https://github.com/stnkl/ESPEssentials
44+
- name: Create main file
45+
run: |
46+
echo "#include <Arduino.h>" >> main.ino
47+
echo "void setup() { }" >> main.ino
48+
echo "void loop() { }" >> main.ino
49+
- name: Run PlatformIO
50+
run: pio ci --board=${{ matrix.board }} .
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build examples
2+
3+
on: [push, pull_request]
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/BasicExample/BasicExample.ino"
17+
- "examples/ColorPickers/ColorPickers.ino"
18+
- "examples/Sliders/Sliders.ino"
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Cache pip
23+
uses: actions/cache@v2
24+
with:
25+
path: ~/.cache/pip
26+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
27+
restore-keys: ${{ runner.os }}-pip-
28+
- name: Cache PlatformIO
29+
uses: actions/cache@v2
30+
with:
31+
path: ~/.platformio
32+
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
33+
- name: Set up Python
34+
uses: actions/setup-python@v2
35+
- name: Install PlatformIO
36+
run: |
37+
python -m pip install --upgrade pip
38+
pip install --upgrade platformio
39+
- name: Install 3rd party dependencies
40+
run: |
41+
pio lib -g install \
42+
ArduinoJson \
43+
FastLED \
44+
LinkedList \
45+
WebSockets \
46+
https://github.com/tzapu/WiFiManager \
47+
https://github.com/stnkl/ESPEssentials \
48+
https://github.com/stnkl/FastLEDHub
49+
- name: Run PlatformIO examples
50+
run: pio ci --board=${{ matrix.board }}
51+
env:
52+
PLATFORMIO_CI_SRC: ${{ matrix.example }}

0 commit comments

Comments
 (0)