|
18 | 18 | - uses: actions/checkout@v4 |
19 | 19 | with: |
20 | 20 | submodules: 'true' |
21 | | - - name: Install Python packages |
22 | | - env: |
23 | | - PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" |
24 | | - run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb |
25 | | - - name: Build and Run ESP-IDF USB Device examples |
| 21 | + - name: Build ESP-IDF USB Device examples |
26 | 22 | shell: bash |
27 | 23 | run: | |
28 | 24 | . ${IDF_PATH}/export.sh |
|
32 | 28 | python .github/ci/override_managed_component.py tinyusb . ${EXAMPLES_PATH}/tusb_* |
33 | 29 | idf-build-apps find --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE} --build-dir build_@t_@w --work-dir @f_@t_@w |
34 | 30 | idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE} --build-dir build_@t_@w --work-dir @f_@t_@w |
35 | | - pytest ${EXAMPLES_PATH} --target esp32s2 |
| 31 | + - uses: actions/upload-artifact@v4 |
| 32 | + with: |
| 33 | + name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} |
| 34 | + path: | |
| 35 | + **/*_usb_device_tusb_*/build_esp*/bootloader/bootloader.bin |
| 36 | + **/*_usb_device_tusb_*/build_esp*/partition_table/partition-table.bin |
| 37 | + **/*_usb_device_tusb_*/build_esp*/tusb_*.bin |
| 38 | + **/*_usb_device_tusb_*/build_esp*/tusb_*.elf |
| 39 | + **/*_usb_device_tusb_*/build_esp*/build/flasher_args.json |
| 40 | + **/*_usb_device_tusb_*/build_esp*/config/sdkconfig.json |
| 41 | + if-no-files-found: error |
| 42 | + |
| 43 | + run-target: |
| 44 | + name: Run pytest for USB Device examples |
| 45 | + if: ${{ github.repository_owner == 'espressif' }} |
| 46 | + needs: build |
| 47 | + strategy: |
| 48 | + fail-fast: false |
| 49 | + matrix: |
| 50 | + # idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"] |
| 51 | + idf_ver: ["latest"] |
| 52 | + idf_target: ["esp32s2"] |
| 53 | + runner_tag: ["usb_device"] |
| 54 | + runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"] |
| 55 | + container: |
| 56 | + image: python:3.11-bookworm |
| 57 | + options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" --group-add plugdev |
| 58 | + steps: |
| 59 | + - uses: actions/checkout@v4 |
| 60 | + - uses: actions/download-artifact@v4 |
| 61 | + with: |
| 62 | + name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} |
| 63 | + - name: Install Python packages |
| 64 | + env: |
| 65 | + PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" |
| 66 | + run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb |
| 67 | + - name: Run USB Test App on target |
| 68 | + run: | |
| 69 | + ls |
| 70 | + echo ${IDF_PATH} |
| 71 | + pytest --embedded-services esp,idf --target=${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --build-dir=build_${{ matrix.idf_target }} |
0 commit comments