1
- name : Build for ESP8266 and ESP32
1
+ name : Build for ESP8266 and ESP32
2
+
2
3
on :
3
4
workflow_dispatch :
4
-
5
5
pull_request :
6
6
branches : [ master ]
7
7
paths :
8
8
- src/**
9
9
- examples/**
10
-
11
- jobs :
12
- build :
13
10
11
+ jobs :
12
+ build-esp8266 :
14
13
runs-on : ubuntu-latest
15
14
strategy :
16
15
matrix :
17
- example : [examples/ACUnit, examples/AirQualitySensor/AirQualitySensor, examples/Blinds, examples/ContactSensor, examples/DimSwitch, examples/doorbell, examples/Fan, examples/GarageDoor, examples/Light/Light, examples/Lock/Lock, examples/Lock/Lock_with_feedback, examples/MotionSensor, examples/PowerSensor, examples/Relay/MultiRelays_advance, examples/Relay/Relay, examples/Speaker, examples/Switch/MultiSwitch_advance, examples/Switch/MultiSwitch_beginner, examples/Switch/MultiSwitch_intermediate, examples/Switch/Switch, examples/Thermostat, examples/TV, examples/OTAUpdate, examples/Health, examples/Settings/MultiWiFi, examples/Camera/motion-capture, examples/Camera/snapshot-camera]
18
-
16
+ # Base examples that work on both platforms
17
+ example : &base_examples
18
+ - examples/ACUnit
19
+ - examples/Blinds
20
+ - examples/ContactSensor
21
+ - examples/DimSwitch
22
+ - examples/doorbell
23
+ - examples/Fan
24
+ - examples/GarageDoor
25
+ - examples/Light/Light
26
+ - examples/Lock/Lock
27
+ - examples/Lock/Lock_with_feedback
28
+ - examples/MotionSensor
29
+ - examples/PowerSensor
30
+ - examples/Relay/MultiRelays_advance
31
+ - examples/Relay/Relay
32
+ - examples/Speaker
33
+ - examples/Switch/MultiSwitch_advance
34
+ - examples/Switch/MultiSwitch_beginner
35
+ - examples/Switch/MultiSwitch_intermediate
36
+ - examples/Switch/Switch
37
+ - examples/Thermostat
38
+ - examples/TV
39
+ - examples/OTAUpdate
40
+ - examples/Health
41
+ - examples/Settings/MultiWiFi
42
+ - examples/AirQualitySensor/AirQualitySensor
19
43
steps :
44
+ - name : Checkout Repo
45
+ uses : actions/checkout@v4
46
+
47
+ - name : Cache pip
48
+ uses : actions/cache@v3
49
+ with :
50
+ path : ~/.cache/pip
51
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
52
+ restore-keys : ${{ runner.os }}-pip-
53
+
54
+ - name : Cache PlatformIO
55
+ uses : actions/cache@v3
56
+ with :
57
+ path : ~/.platformio
58
+ key : ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
59
+
60
+ - name : Set up Python
61
+ uses : actions/setup-python@v3
62
+
63
+ - name : Install PlatformIO
64
+ run : |
65
+ python -m pip install --upgrade pip
66
+ pip install --upgrade platformio
67
+
68
+ - name : Install library dependencies
69
+ run : |
70
+ pio pkg install -l "bblanchon/ArduinoJson" -l "links2004/WebSockets" -g
71
+
72
+ - name : Run build test using PlatformIO
73
+ run : pio ci --lib="." -b esp12e
74
+ env :
75
+ PLATFORMIO_CI_SRC : ${{ matrix.example }}
20
76
21
- - name : Step 1 - Checkout Repo
22
- uses : actions/checkout@v4
23
- - name : Step 2 - Cache pip
24
- uses : actions/cache@v3
25
- with :
26
- path : ~/.cache/pip
27
- key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
28
- restore-keys : ${{ runner.os }}-pip-
29
- - name : Step 3 - Cache PlatformIO
30
- uses : actions/cache@v3
31
- with :
32
- path : ~/.platformio
33
- key : ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
34
- - name : Step 4 - Set up Python
35
- uses : actions/setup-python@v3
36
- - name : Step 5 - Install PlatformIO
37
- run : |
38
- python -m pip install --upgrade pip
39
- pip install --upgrade platformio
40
- - name : Step 6 - Install library dependencies
41
- run : |
42
- pio pkg install -l "bblanchon/ArduinoJson" -l "links2004/WebSockets" -g
43
- - name : Step 7 - Run build test using PlatformIO
44
- run : pio ci --lib="." -b esp12e -b esp32dev
45
- env :
46
- PLATFORMIO_CI_SRC : ${{ matrix.example }}
77
+ build-esp32 :
78
+ runs-on : ubuntu-latest
79
+ strategy :
80
+ matrix :
81
+ example :
82
+ # Include all base examples
83
+ - *base_examples
84
+ # ESP32-specific examples
85
+ - &esp32_examples
86
+ - examples/Camera/motion-capture
87
+ - examples/Camera/snapshot-camera
88
+ steps :
89
+ - name : Checkout Repo
90
+ uses : actions/checkout@v4
91
+
92
+ - name : Cache pip
93
+ uses : actions/cache@v3
94
+ with :
95
+ path : ~/.cache/pip
96
+ key : ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
97
+ restore-keys : ${{ runner.os }}-pip-
98
+
99
+ - name : Cache PlatformIO
100
+ uses : actions/cache@v3
101
+ with :
102
+ path : ~/.platformio
103
+ key : ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
104
+
105
+ - name : Set up Python
106
+ uses : actions/setup-python@v3
107
+
108
+ - name : Install PlatformIO
109
+ run : |
110
+ python -m pip install --upgrade pip
111
+ pip install --upgrade platformio
112
+
113
+ - name : Install library dependencies
114
+ run : |
115
+ pio pkg install -l "bblanchon/ArduinoJson" -l "links2004/WebSockets" -g
116
+
117
+ - name : Run build test using PlatformIO
118
+ run : pio ci --lib="." -b esp32dev
119
+ env :
120
+ PLATFORMIO_CI_SRC : ${{ matrix.example }}
0 commit comments