Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 3 additions & 3 deletions .github/workflows/build_and_run_esp_usb_test_apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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}"
Expand All @@ -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 }}"]
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/build_and_run_idf_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,37 @@ 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_*
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/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
Expand All @@ -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 }}"]
Expand All @@ -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 }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_iot_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}