|
| 1 | +name: ESP-USB Test Apps |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, reopened, synchronize] |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + name: Build |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"] |
| 13 | + runs-on: ubuntu-latest |
| 14 | + container: espressif/idf:${{ matrix.idf_ver }} |
| 15 | + env: |
| 16 | + ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps |
| 17 | + steps: |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + with: |
| 20 | + submodules: 'true' |
| 21 | + - name: Clone esp-usb repository |
| 22 | + run: | |
| 23 | + git clone https://github.com/espressif/esp-usb.git |
| 24 | + - name: Build |
| 25 | + shell: bash |
| 26 | + run: | |
| 27 | + . ${IDF_PATH}/export.sh |
| 28 | + pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade |
| 29 | + export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function" |
| 30 | + export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes" |
| 31 | + export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}" |
| 32 | + python .github/ci/override_managed_component.py tinyusb . ${{ env.ESP_TINYUSB_TEST_APPS }}/*/ |
| 33 | + cd esp-usb |
| 34 | + idf-build-apps find --path ./device/esp_tinyusb/test_apps/ |
| 35 | + idf-build-apps build --path ./device/esp_tinyusb/test_apps/ |
| 36 | + - uses: actions/upload-artifact@v4 |
| 37 | + with: |
| 38 | + name: usb_test_app_bin_${{ matrix.idf_ver }} |
| 39 | + path: | |
| 40 | + ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/bootloader/bootloader.bin |
| 41 | + ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/partition_table/partition-table.bin |
| 42 | + ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/test_app_*.bin |
| 43 | + ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/test_app_*.elf |
| 44 | + ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/flasher_args.json |
| 45 | + ${{env.ESP_TINYUSB_TEST_APPS}}/**/build_*/config/sdkconfig.json |
| 46 | + if-no-files-found: error |
| 47 | + |
| 48 | + # run-target: |
| 49 | + # name: Run |
| 50 | + # if: ${{ github.repository_owner == 'espressif' }} |
| 51 | + # needs: build |
| 52 | + # strategy: |
| 53 | + # matrix: |
| 54 | + # idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "release-v5.5", "latest"] |
| 55 | + # idf_target: ["esp32s2"] |
| 56 | + # runner_tag: ["usb_device"] |
| 57 | + # runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"] |
| 58 | + # container: |
| 59 | + # image: python:3.11-bookworm |
| 60 | + # options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" |
| 61 | + # env: |
| 62 | + # ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps |
| 63 | + # steps: |
| 64 | + # - uses: actions/checkout@v4 |
| 65 | + # - name: Clone esp-usb repository |
| 66 | + # run: | |
| 67 | + # git clone https://github.com/espressif/esp-usb.git |
| 68 | + # - name: ⚙️ Install System tools |
| 69 | + # run: | |
| 70 | + # apt update |
| 71 | + # apt install -y usbutils |
| 72 | + # - name: Install Python packages |
| 73 | + # env: |
| 74 | + # PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/" |
| 75 | + # run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb |
| 76 | + # - uses: actions/download-artifact@v4 |
| 77 | + # with: |
| 78 | + # name: usb_test_app_bin_${{ matrix.idf_ver }} |
| 79 | + # path: ${{env.ESP_TINYUSB_TEST_APPS}} |
| 80 | + # - name: Run USB Test App on target |
| 81 | + # run: pytest ${{env.ESP_TINYUSB_TEST_APPS}} --embedded-services esp,idf --target=${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --build-dir=build_${{ matrix.idf_target }} |
0 commit comments