feat(usb_host): USB Component overriding in IDF service releases #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Run Overridden USB Test Application | |
| on: | |
| pull_request: | |
| types: [opened, reopened, synchronize] | |
| jobs: | |
| build: | |
| name: Build Overridden USB TestApps | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| idf_ver: ["release-v5.4", "release-v5.5", "latest"] | |
| runs-on: ubuntu-latest | |
| container: espressif/idf:${{ matrix.idf_ver }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'true' | |
| - name: Build USB Test Application | |
| shell: bash | |
| run: | | |
| . ${IDF_PATH}/export.sh | |
| git config --global safe.directory $(pwd) | |
| pip install idf-build-apps==2.12.2 --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}" | |
| export ENV_VAR_OVERRIDE_USB_COMPONENT=yes | |
| idf-build-apps find --exclude device/esp_tinyusb host/usb clang_tidy -v | |
| idf-build-apps build --exclude device/esp_tinyusb host/usb clang_tidy -v | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: usb_test_app_bin_${{ matrix.idf_ver }} | |
| path: | | |
| **/test_app*/**/build_esp*/bootloader/bootloader.bin | |
| **/test_app*/**/build_esp*/partition_table/partition-table.bin | |
| **/test_app*/**/build_esp*/test_app_*.bin | |
| **/test_app*/**/build_esp*/test_app_*.elf | |
| **/test_app*/**/build_esp*/flasher_args.json | |
| **/test_app*/**/build_esp*/config/sdkconfig.json | |
| if-no-files-found: error | |
| run-target: | |
| name: Run overridden USB Host TestApps on target | |
| if: ${{ github.repository_owner == 'espressif' }} | |
| needs: build | |
| strategy: | |
| matrix: | |
| idf_ver: ["release-v5.4", "release-v5.5", "latest"] | |
| idf_target: ["esp32s2", "esp32p4"] | |
| runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "usb_host"] | |
| container: | |
| image: python:3.11-bookworm | |
| options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: usb_test_app_bin_${{ matrix.idf_ver }} | |
| - name: ⚙️ Install System tools | |
| run: | | |
| apt update | |
| apt install -y usbutils | |
| - name: Install Python packages | |
| env: | |
| PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" | |
| run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb | |
| - name: Run USB Test App on target | |
| run: pytest --embedded-services esp,idf --target=${{ matrix.idf_target }} -m usb_host --build-dir=build_${{ matrix.idf_target }} |