Skip to content

Commit 56cfcbb

Browse files
committed
ci(workflow): Added build network examples to CI
1 parent 6dd8b4e commit 56cfcbb

File tree

2 files changed

+32
-6
lines changed

2 files changed

+32
-6
lines changed

.github/ci/override_managed_component.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/usr/bin/env python
22
#
3-
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
3+
# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
44
# SPDX-License-Identifier: Apache-2.0
55

66
import sys
77
import argparse
88
from pathlib import Path
99
from glob import glob
10+
from os import path
1011
from idf_component_tools.manifest import ManifestManager
1112

1213

@@ -47,6 +48,11 @@ def override_with_local_component_all(component, local_path, apps):
4748

4849
# Go through all collected apps
4950
for app in apps_with_glob:
51+
# Verify that the app is a valid directory
52+
if not path.isdir(app):
53+
print(f"[Warning] Skipping app '{app}' as it is not a valid directory.")
54+
continue # Skip to the next app
55+
# Process the app if it's a directory
5056
try:
5157
override_with_local_component(component, local_path, app)
5258
except:
Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build ESP-IDF USB examples
1+
name: ESP-IDF Examples
22

33
on:
44
schedule:
@@ -11,18 +11,38 @@ jobs:
1111
strategy:
1212
matrix:
1313
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
14+
target: ["esp32s2", "esp32s3", "esp32p4"]
15+
example:
16+
- { name: "USB Device", path: "examples/peripherals/usb/device", manifest_path: "examples/peripherals"}
17+
- { name: "Network", path: "examples/network", manifest_path: "examples/network" }
18+
exclude:
19+
# Exclude esp32p4 for releases before IDF 5.3 for all runner tags (esp32p4 support starts in IDF 5.3)
20+
- idf_ver: "release-v5.0"
21+
target: "esp32p4"
22+
- idf_ver: "release-v5.1"
23+
target: "esp32p4"
24+
- idf_ver: "release-v5.2"
25+
target: "esp32p4"
26+
# Exclude esp32p4 for Network examples
27+
- target: "esp32p4"
28+
example: { name: "Network", path: "examples/network", manifest_path: "examples/network" }
29+
# Exclude Network examples for releases IDF 5.0 and 5.1
30+
- example: { name: "Network", path: "examples/network", manifest_path: "examples/network" }
31+
idf_ver: "release-v5.0"
32+
- example: { name: "Network", path: "examples/network", manifest_path: "examples/network" }
33+
idf_ver: "release-v5.1"
1434
runs-on: ubuntu-20.04
1535
container: espressif/idf:${{ matrix.idf_ver }}
1636
steps:
1737
- uses: actions/checkout@v4
1838
with:
1939
submodules: 'true'
20-
- name: Build ESP-IDF USB examples
40+
- name: Build
2141
shell: bash
2242
run: |
2343
. ${IDF_PATH}/export.sh
2444
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
25-
python .github/ci/override_managed_component.py esp_tinyusb device/esp_tinyusb ${IDF_PATH}/examples/peripherals/usb/device/tusb_*
45+
python .github/ci/override_managed_component.py esp_tinyusb device/esp_tinyusb ${IDF_PATH}/${{ matrix.example.path }}/*
2646
cd ${IDF_PATH}
27-
idf-build-apps find --path examples/peripherals/usb/device/ --recursive --target all --manifest-file examples/peripherals/.build-test-rules.yml --build-dir build_@t_@w --work-dir @f_@t_@w
28-
idf-build-apps build --path examples/peripherals/usb/device/ --recursive --target all --manifest-file examples/peripherals/.build-test-rules.yml --build-dir build_@t_@w --work-dir @f_@t_@w
47+
idf-build-apps find --path ${{ matrix.example.path }} --recursive --target ${{ matrix.target }} --manifest-file ${{ matrix.example.manifest_path }}/.build-test-rules.yml --build-dir build_@t_@w --work-dir @f_@t_@w
48+
idf-build-apps build --path ${{ matrix.example.path }} --recursive --target ${{ matrix.target }} --manifest-file ${{ matrix.example.manifest_path }}/.build-test-rules.yml --build-dir build_@t_@w --work-dir @f_@t_@w

0 commit comments

Comments
 (0)