diff --git a/.github/ci/override_managed_component.py b/.github/ci/override_managed_component.py index bae246804a..80d6381b89 100644 --- a/.github/ci/override_managed_component.py +++ b/.github/ci/override_managed_component.py @@ -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): @@ -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() diff --git a/.github/workflows/build_and_run_esp_usb_test_apps.yml b/.github/workflows/build_and_run_esp_usb_test_apps.yml index 14f131535d..28c8111c1a 100644 --- a/.github/workflows/build_and_run_esp_usb_test_apps.yml +++ b/.github/workflows/build_and_run_esp_usb_test_apps.yml @@ -9,7 +9,7 @@ jobs: 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.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: @@ -26,7 +26,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}" @@ -51,7 +51,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.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 }}"] diff --git a/.github/workflows/build_and_run_idf_examples.yml b/.github/workflows/build_and_run_idf_examples.yml index cd3f91a8b1..6476352683 100644 --- a/.github/workflows/build_and_run_idf_examples.yml +++ b/.github/workflows/build_and_run_idf_examples.yml @@ -8,17 +8,29 @@ 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: Install Python dependencies + 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 + - name: Build Network USB related examples + shell: bash + run: | + . ${IDF_PATH}/export.sh + 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}/ --target esp32s2 --manifest-file ${MANIFEST_FILE} + idf-build-apps build --path ${EXAMPLES_PATH}/ --target esp32s2 --manifest-file ${MANIFEST_FILE} + - name: Build USB Device examples shell: bash run: | . ${IDF_PATH}/export.sh - pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --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_* @@ -26,6 +38,7 @@ jobs: idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE} - uses: actions/upload-artifact@v4 with: + # We upload only the USB Device example binaries to run them on the target name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} path: | /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/bootloader/bootloader.bin @@ -36,13 +49,13 @@ jobs: /opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/config/sdkconfig.json if-no-files-found: error run-target: - name: Run + name: Run USB Device examples if: ${{ github.repository_owner == 'espressif' }} needs: build 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 }}"] @@ -60,7 +73,7 @@ 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 idf_ci pytest_ignore_test_results pytest-timeout netifaces - uses: actions/download-artifact@v4 with: name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} diff --git a/.github/workflows/build_iot_examples.yml b/.github/workflows/build_iot_examples.yml index 3e15fef86d..0a527f7969 100644 --- a/.github/workflows/build_iot_examples.yml +++ b/.github/workflows/build_iot_examples.yml @@ -8,7 +8,7 @@ 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.3", "release-v5.4", "release-v5.5", "latest"] name: ["usb_uart_bridge"] runs-on: ubuntu-latest container: espressif/idf:${{ matrix.idf_ver }} @@ -27,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 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 }}