Skip to content

Commit 19624cc

Browse files
committed
fix(ci): Fixed build IDF and IOT solutions examples, added network example build
1 parent e699acc commit 19624cc

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

.github/ci/override_managed_component.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
import sys
77
import argparse
8+
import yaml
89
from pathlib import Path
910
from glob import glob
10-
from idf_component_tools.manifest import ManifestManager
11+
from idf_component_tools.manager import ManifestManager
1112

1213

1314
def override_with_local_component(component, local_path, app):
@@ -28,17 +29,17 @@ def override_with_local_component(component, local_path, app):
2829
component_with_namespace = 'espressif/' + component
2930

3031
try:
31-
manager.manifest_tree['dependencies'][component_with_namespace] = {
32+
manifest_tree = yaml.safe_load(Path(manager.path).read_text())
33+
manifest_tree['dependencies'][component_with_namespace] = {
3234
'version': '*',
3335
'override_path': str(absolute_local_path)
34-
}
36+
}
37+
with open(manager.path, 'w') as f:
38+
yaml.dump(manifest_tree, f, allow_unicode=True, Dumper=yaml.SafeDumper)
3539
except KeyError:
3640
print('[Error] {} app does not depend on {}'.format(app, component_with_namespace))
3741
raise KeyError
3842

39-
manager.dump()
40-
41-
4243
def override_with_local_component_all(component, local_path, apps):
4344
# Process wildcard, e.g. "app_prefix_*"
4445
apps_with_glob = list()

.github/workflows/build_and_run_esp_usb_test_apps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
name: Build
1010
strategy:
1111
matrix:
12-
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
12+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
1313
runs-on: ubuntu-latest
1414
container: espressif/idf:${{ matrix.idf_ver }}
1515
env:
@@ -26,7 +26,7 @@ jobs:
2626
shell: bash
2727
run: |
2828
. ${IDF_PATH}/export.sh
29-
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
29+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
3030
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
3131
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
3232
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
@@ -51,7 +51,7 @@ jobs:
5151
needs: build
5252
strategy:
5353
matrix:
54-
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
54+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
5555
idf_target: ["esp32s2"]
5656
runner_tag: ["usb_device"]
5757
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]

.github/workflows/build_and_run_idf_examples.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,35 @@ jobs:
88
build:
99
strategy:
1010
matrix:
11-
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
11+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
1212
fail-fast: false
1313
runs-on: ubuntu-latest
1414
container: espressif/idf:${{ matrix.idf_ver }}
1515
steps:
1616
- uses: actions/checkout@v4
17-
- name: Build
17+
- name: Export ESP-IDF environment and install Python dependencies
1818
shell: bash
1919
run: |
2020
. ${IDF_PATH}/export.sh
21-
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
21+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
22+
- name: Build Network USB related examples
23+
shell: bash
24+
run: |
25+
export EXAMPLES_PATH="${IDF_PATH}/examples/network/sta2eth"
26+
export MANIFEST_FILE="${IDF_PATH}/examples/network/.build-test-rules.yml"
27+
idf-build-apps find --path ${EXAMPLES_PATH}/ --target esp32s2 --manifest-file ${MANIFEST_FILE}
28+
idf-build-apps build --path ${EXAMPLES_PATH}/ --target esp32s2 --manifest-file ${MANIFEST_FILE}
29+
- name: Build USB Device examples
30+
shell: bash
31+
run: |
2232
export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device"
2333
export MANIFEST_FILE="${IDF_PATH}/examples/peripherals/.build-test-rules.yml"
2434
python .github/ci/override_managed_component.py tinyusb . ${EXAMPLES_PATH}/tusb_*
2535
idf-build-apps find --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
2636
idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
2737
- uses: actions/upload-artifact@v4
2838
with:
39+
# We upload only the USB Device example binaries to run them on the target
2940
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }}
3041
path: |
3142
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/bootloader/bootloader.bin
@@ -36,13 +47,13 @@ jobs:
3647
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/config/sdkconfig.json
3748
if-no-files-found: error
3849
run-target:
39-
name: Run
50+
name: Run USB Device examples
4051
if: ${{ github.repository_owner == 'espressif' }}
4152
needs: build
4253
strategy:
4354
fail-fast: false
4455
matrix:
45-
idf_ver: ["release-v5.3", "release-v5.4", "latest"]
56+
idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5" , "latest"]
4657
idf_target: ["esp32s2"]
4758
runner_tag: ["usb_device"]
4859
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
@@ -60,7 +71,7 @@ jobs:
6071
run: |
6172
cd ${IDF_PATH}
6273
. ./export.sh
63-
pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb python-gitlab minio idf-build-apps pytest_ignore_test_results pytest-timeout netifaces
74+
pip install --no-cache-dir --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-jtag pytest-embedded-idf pyserial pyusb python-gitlab minio idf-build-apps pytest_ignore_test_results pytest-timeout netifaces
6475
- uses: actions/download-artifact@v4
6576
with:
6677
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }}

.github/workflows/build_iot_examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
build:
99
strategy:
1010
matrix:
11-
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
11+
idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5", "latest"]
1212
name: ["usb_uart_bridge"]
1313
runs-on: ubuntu-latest
1414
container: espressif/idf:${{ matrix.idf_ver }}
@@ -27,7 +27,7 @@ jobs:
2727
shell: bash
2828
run: |
2929
. ${IDF_PATH}/export.sh
30-
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
30+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
3131
python .github/ci/override_managed_component.py tinyusb . ${{ env.EXAMPLE_PATH }}/
3232
idf-build-apps find --paths ${{ env.EXAMPLE_PATH }} --target all --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}
3333
idf-build-apps build --paths ${{ env.EXAMPLE_PATH }} --target all --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}

0 commit comments

Comments
 (0)