Skip to content

Commit abbc656

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

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
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.0", "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.0", "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: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,27 @@ 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: Build Network USB related examples
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+
export EXAMPLES_PATH="${IDF_PATH}/examples/network/sta2eth"
23+
export MANIFEST_FILE="${IDF_PATH}/examples/network/.build-test-rules.yml"
24+
idf-build-apps find --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
25+
idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
26+
- uses: actions/checkout@v4
27+
- name: Build USB Device examples
28+
shell: bash
29+
run: |
30+
. ${IDF_PATH}/export.sh
31+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
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_*
@@ -42,7 +52,7 @@ jobs:
4252
strategy:
4353
fail-fast: false
4454
matrix:
45-
idf_ver: ["release-v5.3", "release-v5.4", "latest"]
55+
idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5" , "latest"]
4656
idf_target: ["esp32s2"]
4757
runner_tag: ["usb_device"]
4858
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
@@ -60,14 +70,15 @@ jobs:
6070
run: |
6171
cd ${IDF_PATH}
6272
. ./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
73+
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
6474
- uses: actions/download-artifact@v4
6575
with:
6676
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }}
6777
path: /opt/esp/idf/examples/peripherals/usb/device
6878
- name: Run USB Test App on target
6979
run: |
7080
cd ${IDF_PATH}
81+
./install.sh --enable-ci
7182
. ./export.sh
7283
export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device"
7384
pytest ${EXAMPLES_PATH} --target ${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --ignore-result-cases=*ncm_example

.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.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5"]
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)