Skip to content

Commit 871930e

Browse files
feat: add ESP32 CI build validation across all PlatformIO examples
1 parent a2683e7 commit 871930e

11 files changed

Lines changed: 137 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,28 @@ jobs:
169169

170170
- name: Build display peripheral (families_usage)
171171
run: pio run -d examples/families_usage/lhwit_family/display -e nanoatmega328new
172+
173+
# ESP32 build validation
174+
- name: Build simple_controller (core_usage, ESP32)
175+
run: pio run -d examples/core_usage/platformio/simple_controller -e esp32dev
176+
177+
- name: Build simple_peripheral (core_usage, ESP32)
178+
run: pio run -d examples/core_usage/platformio/simple_peripheral -e esp32dev
179+
180+
- name: Build mock_controller (handlers_usage, ESP32)
181+
run: pio run -d examples/handlers_usage/platformio/mock_controller -e esp32dev
182+
183+
- name: Build mock_peripheral (handlers_usage, ESP32)
184+
run: pio run -d examples/handlers_usage/platformio/mock_peripheral -e esp32dev
185+
186+
- name: Build calculator peripheral (families_usage, ESP32)
187+
run: pio run -d examples/families_usage/lhwit_family/calculator -e esp32dev
188+
189+
- name: Build LED peripheral (families_usage, ESP32)
190+
run: pio run -d examples/families_usage/lhwit_family/led -e esp32dev
191+
192+
- name: Build servo peripheral (families_usage, ESP32)
193+
run: pio run -d examples/families_usage/lhwit_family/servo -e esp32dev
194+
195+
- name: Build display peripheral (families_usage, ESP32)
196+
run: pio run -d examples/families_usage/lhwit_family/display -e esp32dev

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ All notable changes to CRUMBS are documented in this file.
66

77
## [Unreleased]
88

9+
### Added
10+
11+
- **ESP32 CI build validation**`[env:esp32dev]` added to all eight example `platformio.ini`
12+
files; eight matching `esp32dev` build steps added to the `platformio` CI job. Validates that
13+
all examples compile cleanly for ESP32 (espressif32 platform, Arduino framework).
14+
- `docs/platform-setup.md` — added ESP32 `platformio.ini` snippet with I²C pin note.
15+
916
### Fixed
1017

1118
- **`examples/handlers_usage/linux/mock_controller/mock_controller.c`** — updated all

docs/platform-setup.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,21 +151,38 @@ void loop() {
151151

152152
PlatformIO can automatically fetch CRUMBS as a library dependency.
153153

154-
**Example platformio.ini:**
154+
**Example platformio.ini (Arduino Nano):**
155155

156156
```ini
157-
[env:uno]
157+
[env:nanoatmega328new]
158158
platform = atmelavr
159-
board = uno
159+
board = nanoatmega328new
160160
framework = arduino
161161

162162
lib_deps =
163-
CRUMBS
163+
cameronbrooks11/CRUMBS@^0.11.0
164164

165165
build_flags =
166-
-DCRUMBS_MAX_HANDLERS=8 # Optional: reduce handler table size
166+
-DCRUMBS_MAX_HANDLERS=8 ; optional: reduce handler table size
167167
```
168168

169+
**Example platformio.ini (ESP32):**
170+
171+
```ini
172+
[env:esp32dev]
173+
platform = espressif32
174+
board = esp32dev
175+
framework = arduino
176+
177+
lib_deps =
178+
cameronbrooks11/CRUMBS@^0.11.0
179+
180+
build_flags =
181+
-DCRUMBS_MAX_HANDLERS=8 ; optional
182+
```
183+
184+
> **ESP32 I²C pins:** GPIO 21 (SDA), GPIO 22 (SCL) by default. Use `Wire.begin(sda, scl)` to override.
185+
169186
**To install and build:**
170187

171188
```bash

examples/core_usage/platformio/simple_controller/platformio.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,13 @@ monitor_speed = 115200
2626
lib_deps =
2727
cameronbrooks11/CRUMBS@^0.11.0
2828

29+
[env:esp32dev]
30+
platform = espressif32
31+
board = esp32dev
32+
framework = arduino
33+
monitor_speed = 115200
34+
lib_deps =
35+
cameronbrooks11/CRUMBS@^0.11.0
36+
2937
[platformio]
3038
default_envs = nanoatmega328new

examples/core_usage/platformio/simple_peripheral/platformio.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,13 @@ monitor_speed = 115200
2626
lib_deps =
2727
cameronbrooks11/CRUMBS@^0.11.0
2828

29+
[env:esp32dev]
30+
platform = espressif32
31+
board = esp32dev
32+
framework = arduino
33+
monitor_speed = 115200
34+
lib_deps =
35+
cameronbrooks11/CRUMBS@^0.11.0
36+
2937
[platformio]
3038
default_envs = nanoatmega328new

examples/families_usage/lhwit_family/calculator/platformio.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,16 @@ build_flags =
2222
lib_deps =
2323
cameronbrooks11/CRUMBS@^0.11.0
2424

25+
[env:esp32dev]
26+
platform = espressif32
27+
board = esp32dev
28+
framework = arduino
29+
monitor_speed = 115200
30+
build_flags =
31+
-DCRUMBS_MAX_HANDLERS=8
32+
-I ..
33+
lib_deps =
34+
cameronbrooks11/CRUMBS@^0.11.0
35+
2536
[platformio]
2637
default_envs = nanoatmega328new

examples/families_usage/lhwit_family/display/platformio.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,17 @@ lib_deps =
2424
cameronbrooks11/CRUMBS@^0.11.0
2525
adrian200223/Simple5641AS@^1.0.0
2626

27+
[env:esp32dev]
28+
platform = espressif32
29+
board = esp32dev
30+
framework = arduino
31+
monitor_speed = 115200
32+
build_flags =
33+
-DCRUMBS_MAX_HANDLERS=6
34+
-I ..
35+
lib_deps =
36+
cameronbrooks11/CRUMBS@^0.11.0
37+
adrian200223/Simple5641AS@^1.0.0
38+
2739
[platformio]
2840
default_envs = nanoatmega328new

examples/families_usage/lhwit_family/led/platformio.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,16 @@ build_flags =
2222
lib_deps =
2323
cameronbrooks11/CRUMBS@^0.11.0
2424

25+
[env:esp32dev]
26+
platform = espressif32
27+
board = esp32dev
28+
framework = arduino
29+
monitor_speed = 115200
30+
build_flags =
31+
-DCRUMBS_MAX_HANDLERS=8
32+
-I ..
33+
lib_deps =
34+
cameronbrooks11/CRUMBS@^0.11.0
35+
2536
[platformio]
2637
default_envs = nanoatmega328new

examples/families_usage/lhwit_family/servo/platformio.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,17 @@ lib_deps =
2424
cameronbrooks11/CRUMBS@^0.11.0
2525
Servo
2626

27+
[env:esp32dev]
28+
platform = espressif32
29+
board = esp32dev
30+
framework = arduino
31+
monitor_speed = 115200
32+
build_flags =
33+
-DCRUMBS_MAX_HANDLERS=8
34+
-I ..
35+
lib_deps =
36+
cameronbrooks11/CRUMBS@^0.11.0
37+
Servo
38+
2739
[platformio]
2840
default_envs = nanoatmega328new

examples/handlers_usage/platformio/mock_controller/platformio.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,15 @@ build_flags =
2020
lib_deps =
2121
cameronbrooks11/CRUMBS@^0.11.0
2222

23+
[env:esp32dev]
24+
platform = espressif32
25+
board = esp32dev
26+
framework = arduino
27+
monitor_speed = 115200
28+
build_flags =
29+
-I ../..
30+
lib_deps =
31+
cameronbrooks11/CRUMBS@^0.11.0
32+
2333
[platformio]
2434
default_envs = nanoatmega328new

0 commit comments

Comments
 (0)