Skip to content

Commit f808230

Browse files
committed
Add ESP-IDF native build check workflow
1 parent 337e3d6 commit f808230

1 file changed

Lines changed: 132 additions & 0 deletions

File tree

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
name: Build(esp-idf-native)
2+
3+
on:
4+
push:
5+
tags-ignore:
6+
- '*.*.*'
7+
- 'v*.*.*'
8+
branches:
9+
- '*'
10+
paths:
11+
- 'src/**.cpp'
12+
- 'src/**.hpp'
13+
- 'src/**.h'
14+
- 'src/**.c'
15+
- 'CMakeLists.txt'
16+
- 'idf_component.yml'
17+
- 'examples/UnitUnified/**.cpp'
18+
- 'examples/UnitUnified/**.hpp'
19+
- 'examples/UnitUnified/**.h'
20+
- 'examples/UnitUnified/**.c'
21+
- 'examples/UnitUnified/**/CMakeLists.txt'
22+
- 'examples/UnitUnified/**/Kconfig.projbuild'
23+
- 'examples/UnitUnified/common/**'
24+
- '.github/workflows/esp-idf-build-check.yml'
25+
pull_request:
26+
paths:
27+
- 'src/**.cpp'
28+
- 'src/**.hpp'
29+
- 'src/**.h'
30+
- 'src/**.c'
31+
- 'CMakeLists.txt'
32+
- 'idf_component.yml'
33+
- 'examples/UnitUnified/**.cpp'
34+
- 'examples/UnitUnified/**.hpp'
35+
- 'examples/UnitUnified/**.h'
36+
- 'examples/UnitUnified/**.c'
37+
- 'examples/UnitUnified/**/CMakeLists.txt'
38+
- 'examples/UnitUnified/**/Kconfig.projbuild'
39+
- 'examples/UnitUnified/common/**'
40+
- '.github/workflows/esp-idf-build-check.yml'
41+
workflow_dispatch:
42+
43+
defaults:
44+
run:
45+
shell: bash
46+
47+
concurrency:
48+
group: ${{ github.workflow }}-${{ github.ref }}
49+
cancel-in-progress: true
50+
51+
# Cross design: variant coverage on esp32s3, chip coverage on the other SoCs with the default
52+
# I2C variant (UnitRFID2). The M5Unit-RFID driver (WS1850S) is exercised by UnitRFID2 (GROVE I2C)
53+
# and the M5Dial built-in WS1850S (In_I2C, ESP32-S3 only); UnitNFC / CapCC1101 select the
54+
# ST25R3916 (M5Unit-NFC) path and are not built here. RFID has no Tab5-specific example, so
55+
# esp32p4 (Tab5) is folded into chip coverage rather than a separate Tab5 job.
56+
jobs:
57+
# Variant coverage: RFID variants on esp32s3 (LCD-capable dual-core Xtensa with PSRAM; also the
58+
# M5Dial host chip). M5Dial built-in (In_I2C) is ESP32-S3 only, so it lives here.
59+
build-variants:
60+
name: ${{ matrix.idf }} esp32s3 ${{ matrix.example_config.label }}
61+
runs-on: ubuntu-latest
62+
timeout-minutes: 30
63+
strategy:
64+
fail-fast: false
65+
max-parallel: 20
66+
matrix:
67+
# idf boundaries: 5.1.7 = oldest legacy-driver (5.0.x dropped: M5GFX needs esp_mm added
68+
# in 5.1), 5.4.4 = new driver/*_master.h + touch_sens.h era, 5.5.4 = latest.
69+
idf: [v5.1.7, v5.4.4, v5.5.4]
70+
# NFCA Detect gets UnitRFID2 (GROVE) and the M5Dial built-in WS1850S (In_I2C). NFCB Detect
71+
# gets UnitRFID2 only (NFCB is not offered for the Dial built-in — small-antenna limit).
72+
example_config:
73+
- label: NFCA-Detect-UnitRFID2 (full)
74+
example_path: examples/UnitUnified/NFCA/Detect
75+
variant: USING_UNIT_RFID2
76+
- label: NFCA-Detect-M5DialBuiltin (full)
77+
example_path: examples/UnitUnified/NFCA/Detect
78+
variant: USING_M5DIAL_BUILTIN_WS1850S
79+
- label: NFCB-Detect-UnitRFID2 (no_dial)
80+
example_path: examples/UnitUnified/NFCB/Detect
81+
variant: USING_UNIT_RFID2
82+
steps:
83+
- name: Checkout
84+
uses: actions/checkout@v4
85+
86+
- name: Select Kconfig variant
87+
# The example's own sdkconfig.defaults is not read (top CMakeLists points SDKCONFIG_DEFAULTS
88+
# at common/sdkconfig.defaults). Append the choice to common/ in the CI workspace only.
89+
run: |
90+
echo "" >> examples/UnitUnified/common/sdkconfig.defaults
91+
echo "CONFIG_EXAMPLE_${{ matrix.example_config.variant }}=y" >> examples/UnitUnified/common/sdkconfig.defaults
92+
93+
- name: ESP-IDF build
94+
uses: espressif/esp-idf-ci-action@v1
95+
with:
96+
esp_idf_version: ${{ matrix.idf }}
97+
target: esp32s3
98+
path: ${{ matrix.example_config.example_path }}
99+
100+
# Chip coverage: NFCA Detect (UnitRFID2 / GROVE I2C) on every other supported SoC. esp32 = classic
101+
# Xtensa dual-core (M5Unified touch-deprecation path). esp32c6 / esp32h2 = RISC-V single-core,
102+
# exercises the app_main CONFIG_FREERTOS_UNICORE feedIdle branch. esp32p4 (M5Stack Tab5) =
103+
# RISC-V dual-core; sdkconfig.defaults.esp32p4 overlay (chip-rev minimum keys) is auto-applied.
104+
build-chips:
105+
name: ${{ matrix.idf }} ${{ matrix.target }} NFCA-Detect-UnitRFID2
106+
runs-on: ubuntu-latest
107+
timeout-minutes: 30
108+
strategy:
109+
fail-fast: false
110+
max-parallel: 20
111+
matrix:
112+
target: [esp32, esp32c6, esp32h2, esp32p4]
113+
idf: [v5.1.7, v5.4.4, v5.5.4]
114+
exclude:
115+
# esp32p4 stable from IDF v5.3 (M5GFX P4 verified on 5.4/5.5). 5.1.7 not applicable.
116+
- target: esp32p4
117+
idf: v5.1.7
118+
steps:
119+
- name: Checkout
120+
uses: actions/checkout@v4
121+
122+
- name: Select Kconfig variant
123+
run: |
124+
echo "" >> examples/UnitUnified/common/sdkconfig.defaults
125+
echo "CONFIG_EXAMPLE_USING_UNIT_RFID2=y" >> examples/UnitUnified/common/sdkconfig.defaults
126+
127+
- name: ESP-IDF build
128+
uses: espressif/esp-idf-ci-action@v1
129+
with:
130+
esp_idf_version: ${{ matrix.idf }}
131+
target: ${{ matrix.target }}
132+
path: examples/UnitUnified/NFCA/Detect

0 commit comments

Comments
 (0)