Skip to content

Commit f3e717e

Browse files
committed
ci(esp_tinyusb): Add separate job
1 parent 29ed442 commit f3e717e

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/run_pytest.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Run Pytest
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * SAT' # Saturday midnight
6+
pull_request:
7+
types: [opened, reopened, synchronize]
8+
9+
jobs:
10+
build:
11+
strategy:
12+
matrix:
13+
idf_ver: ["latest"]
14+
idf_target: ["esp32s2"]
15+
runner_tag: ["usb_device"]
16+
runs-on: [self-hosted, linux, docker, "${{ matrix.idf_target }}", "${{ matrix.runner_tag }}"]
17+
container:
18+
image: espressif/idf:${{ matrix.idf_ver }}
19+
options: --privileged --device-cgroup-rule="c 188:* rmw" --device-cgroup-rule="c 166:* rmw" --group-add plugdev
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
submodules: 'true'
24+
- name: Install Python packages
25+
env:
26+
PIP_EXTRA_INDEX_URL: "https://dl.espressif.com/pypi/"
27+
run: pip install --only-binary cryptography pytest-embedded pytest-embedded-serial-esp pytest-embedded-idf pyserial pyusb
28+
- name: Build ESP-IDF USB Device examples
29+
shell: bash
30+
run: |
31+
. ${IDF_PATH}/export.sh
32+
pip install idf-component-manager==1.5.2 idf-build-apps==2.4.3 --upgrade
33+
export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device"
34+
export MANIFEST_FILE="${IDF_PATH}/examples/peripherals/.build-test-rules.yml"
35+
python .github/ci/override_managed_component.py tinyusb . ${EXAMPLES_PATH}/tusb_*
36+
idf-build-apps find --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE} --build-dir build_@t_@w --work-dir @f_@t_@w
37+
idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE} --build-dir build_@t_@w --work-dir @f_@t_@w
38+
pytest ${EXAMPLES_PATH}/ --target esp32s2

0 commit comments

Comments
 (0)