Skip to content

Commit 5777e5e

Browse files
gnalbandianmathieucarbou
authored andcommitted
Add CI for ESP-IDF example
1 parent e166d23 commit 5777e5e

File tree

3 files changed

+42
-10
lines changed

3 files changed

+42
-10
lines changed

.github/workflows/ci.yml

+37
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,40 @@ jobs:
102102
103103
- run: PLATFORMIO_SRC_DIR=examples/Client PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
104104
- run: PLATFORMIO_SRC_DIR=examples/FetchWebsite PIO_BOARD=${{ matrix.board }} pio run -e ${{ matrix.env }}
105+
106+
esp-idf:
107+
name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
108+
runs-on: ubuntu-latest
109+
strategy:
110+
fail-fast: false
111+
matrix:
112+
# The version names here correspond to the versions of espressif/idf Docker image.
113+
# See https://hub.docker.com/r/espressif/idf/tags and
114+
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
115+
# for details.
116+
idf_ver: ["release-v5.4"]
117+
idf_target:
118+
[
119+
"esp32",
120+
"esp32s2",
121+
"esp32s3",
122+
"esp32c2",
123+
"esp32c3",
124+
"esp32c6",
125+
# "esp32h2",
126+
"esp32p4"
127+
]
128+
container: espressif/idf:${{ matrix.idf_ver }}
129+
steps:
130+
- name: Checkout
131+
uses: actions/checkout@v4
132+
with:
133+
path: components/asynctcp
134+
135+
- name: Build
136+
env:
137+
IDF_TARGET: ${{ matrix.idf_target }}
138+
shell: bash
139+
run: |
140+
. ${IDF_PATH}/export.sh
141+
idf.py -C ./components/asynctcp/idf_component_examples/client -DEXTRA_COMPONENT_DIRS=$PWD/components build

CMakeLists.txt

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
set(COMPONENT_SRCDIRS
2-
"src"
1+
idf_component_register(
2+
SRCS "src/AsyncTCP.cpp"
3+
INCLUDE_DIRS "src"
4+
PRIV_REQUIRES esp_timer
35
)
46

5-
set(COMPONENT_ADD_INCLUDEDIRS
6-
"src"
7-
)
8-
9-
register_component()
10-
117
target_compile_options(${COMPONENT_TARGET} PRIVATE -fno-rtti)
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
idf_component_register(SRCS "main.cpp"
2-
INCLUDE_DIRS "."
3-
PRIV_REQUIRES esp_timer)
2+
INCLUDE_DIRS ".")

0 commit comments

Comments
 (0)