ci(tinyusb): Added esp-idf run (esp32s2) #1
Workflow file for this run
This file contains 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 ESP-IDF USB Device examples | |
on: | |
schedule: | |
- cron: '0 0 * * SAT' # Saturday midnight | |
pull_request: | |
types: [opened, reopened, synchronize] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
# idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"] | |
idf_ver: ["latest"] | |
runs-on: ubuntu-20.04 | |
container: espressif/idf:${{ matrix.idf_ver }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- name: Build ESP-IDF USB Device examples | |
shell: bash | |
run: | | |
. ${IDF_PATH}/export.sh | |
pip install idf-build-apps==2.4.3 --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}" | |
set EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device" | |
set MANIFEST_FILE="${IDF_PATH}/examples/peripherals/.build-test-rules.yml" | |
echo ${EXAMPLES_PATH} | |
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} --build-dir build_@t_@w --work-dir @f_@t_@w | |
idf-build-apps build --path ${EXAMPLES_PATH} --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE} --build-dir build_@t_@w --work-dir @f_@t_@w | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} | |
path: | | |
**/usb/device/tusb_*/build/bootloader/bootloader.bin | |
if-no-files-found: error | |
run-target: | |
name: Run pytest for USB Device examples | |
if: ${{ github.repository_owner == 'espressif' }} | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
# idf_ver: ["release-v5.0", "release-v5.1", "release-v5.2", "release-v5.3", "release-v5.4", "latest"] | |
idf_ver: ["latest"] | |
idf_target: ["esp32s2"] | |
runner_tag: ["usb_host", "usb_device"] | |
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"] | |
container: | |
image: python:3.11-bookworm | |
options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" --group-add plugdev | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }} | |
- 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: | | |
echo "Run" | |
# pytest --embedded-services esp,idf --target=${{ matrix.idf_target }} -m ${{ matrix.runner_tag }} --build-dir=build_${{ matrix.idf_target }} |