Skip to content
Draft
13 changes: 7 additions & 6 deletions .github/ci/override_managed_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

import sys
import argparse
import yaml
from pathlib import Path
from glob import glob
from idf_component_tools.manifest import ManifestManager
from idf_component_tools.manager import ManifestManager


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

try:
manager.manifest_tree['dependencies'][component_with_namespace] = {
manifest_tree = yaml.safe_load(Path(manager.path).read_text())
manifest_tree['dependencies'][component_with_namespace] = {
'version': '*',
'override_path': str(absolute_local_path)
}
}
with open(manager.path, 'w') as f:
yaml.dump(manifest_tree, f, allow_unicode=True, Dumper=yaml.SafeDumper)
except KeyError:
print('[Error] {} app does not depend on {}'.format(app, component_with_namespace))
raise KeyError

manager.dump()


def override_with_local_component_all(component, local_path, apps):
# Process wildcard, e.g. "app_prefix_*"
apps_with_glob = list()
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build_and_run_esp_usb_test_apps.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: ESP-USB Test Apps

on:
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
# pull_request:
# types: [opened, reopened, synchronize]

jobs:
build:
name: Build
strategy:
matrix:
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
runs-on: ubuntu-latest
container: espressif/idf:${{ matrix.idf_ver }}
env:
Expand All @@ -26,7 +27,7 @@ jobs:
shell: bash
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
Expand All @@ -51,7 +52,7 @@ jobs:
needs: build
strategy:
matrix:
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
idf_target: ["esp32s2"]
runner_tag: ["usb_device"]
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
Expand Down
21 changes: 16 additions & 5 deletions .github/workflows/build_and_run_idf_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,27 @@ jobs:
build:
strategy:
matrix:
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"]
fail-fast: false
runs-on: ubuntu-latest
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- uses: actions/checkout@v4
- name: Build
- name: Build Network USB related examples
shell: bash
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
export EXAMPLES_PATH="${IDF_PATH}/examples/network/sta2eth"
export MANIFEST_FILE="${IDF_PATH}/examples/network/.build-test-rules.yml"
idf-build-apps find --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
- uses: actions/checkout@v4
- name: Build USB Device examples
shell: bash
run: |
. ${IDF_PATH}/export.sh
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device"
export MANIFEST_FILE="${IDF_PATH}/examples/peripherals/.build-test-rules.yml"
python .github/ci/override_managed_component.py tinyusb . ${EXAMPLES_PATH}/tusb_*
Expand All @@ -42,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
idf_ver: ["release-v5.3", "release-v5.4", "latest"]
idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5" , "latest"]
idf_target: ["esp32s2"]
runner_tag: ["usb_device"]
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
Expand All @@ -60,14 +70,15 @@ jobs:
run: |
cd ${IDF_PATH}
. ./export.sh
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
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
- uses: actions/download-artifact@v4
with:
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }}
path: /opt/esp/idf/examples/peripherals/usb/device
- name: Run USB Test App on target
run: |
cd ${IDF_PATH}
./install.sh --enable-ci
. ./export.sh
export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device"
pytest ${EXAMPLES_PATH} --target ${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --ignore-result-cases=*ncm_example
9 changes: 5 additions & 4 deletions .github/workflows/build_iot_examples.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: ESP IoT Solution - USB Device Examples

on:
pull_request:
types: [opened, reopened, synchronize]
workflow_call:
# pull_request:
# types: [opened, reopened, synchronize]

jobs:
build:
strategy:
matrix:
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"]
idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5"]
name: ["usb_uart_bridge"]
runs-on: ubuntu-latest
container: espressif/idf:${{ matrix.idf_ver }}
Expand All @@ -27,7 +28,7 @@ jobs:
shell: bash
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.4.3 pyyaml --upgrade
python .github/ci/override_managed_component.py tinyusb . ${{ env.EXAMPLE_PATH }}/
idf-build-apps find --paths ${{ env.EXAMPLE_PATH }} --target all --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}
idf-build-apps build --paths ${{ env.EXAMPLE_PATH }} --target all --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}
Loading