Skip to content

Commit d2cdc3d

Browse files
ci: Build for all targets
1 parent 36dff04 commit d2cdc3d

File tree

4 files changed

+80
-67
lines changed

4 files changed

+80
-67
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Config file for build_idf_examples.yml workflow
2+
3+
paths = [
4+
"examples/peripherals/usb/device", # USB Device examples
5+
#"examples/network/sta2eth", # USB Network example
6+
]
7+
8+
manifest_files = [
9+
"examples/peripherals/.build-test-rules.yml",
10+
"examples/network/.build-test-rules.yml",
11+
]
12+
13+
recursive = true
14+
check_warnings = true
15+
target = "all"
16+
#enable_preview_targets = true
17+
18+
# build related options
19+
build_dir = "build_@t"

.github/workflows/build_and_run_esp_usb_test_apps.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414
container: espressif/idf:${{ matrix.idf_ver }}
1515
env:
16-
ESP_USB_MANIFEST: ./esp-usb/.build-test-rules.yml
1716
ESP_TINYUSB_TEST_APPS: ./esp-usb/device/esp_tinyusb/test_apps
1817
steps:
1918
- uses: actions/checkout@v4
@@ -26,56 +25,57 @@ jobs:
2625
shell: bash
2726
run: |
2827
. ${IDF_PATH}/export.sh
29-
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps pyyaml --upgrade
28+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade
3029
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
3130
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
3231
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
3332
python .github/ci/override_managed_component.py tinyusb . ${{ env.ESP_TINYUSB_TEST_APPS }}/*/
34-
idf-build-apps find --path ${{ env.ESP_TINYUSB_TEST_APPS }}/ --recursive --target esp32s2 --manifest-file ${{ env.ESP_USB_MANIFEST }}
35-
idf-build-apps build --path ${{ env.ESP_TINYUSB_TEST_APPS }}/ --recursive --target esp32s2 --manifest-file ${{ env.ESP_USB_MANIFEST }}
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/
3636
- uses: actions/upload-artifact@v4
3737
with:
3838
name: usb_test_app_bin_${{ matrix.idf_ver }}
3939
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
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
4646
if-no-files-found: error
4747

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 }}
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 }}

.github/workflows/build_and_run_idf_examples.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,41 +12,35 @@ jobs:
1212
fail-fast: false
1313
runs-on: ubuntu-latest
1414
container: espressif/idf:${{ matrix.idf_ver }}
15+
env:
16+
CONFIG_PATH: ${{ github.workspace }}/.github/ci/.idf_build_examples_config.toml
1517
steps:
1618
- uses: actions/checkout@v4
1719
- name: Install Python dependencies
1820
shell: bash
1921
run: |
2022
. ${IDF_PATH}/export.sh
21-
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps pyyaml --upgrade
22-
- name: Build Network USB related examples
23-
shell: bash
24-
run: |
25-
. ${IDF_PATH}/export.sh
26-
export EXAMPLES_PATH="${IDF_PATH}/examples/network/sta2eth"
27-
export MANIFEST_FILE="${IDF_PATH}/examples/network/.build-test-rules.yml"
28-
idf-build-apps find --path ${EXAMPLES_PATH}/ --target esp32s2 --manifest-file ${MANIFEST_FILE}
29-
idf-build-apps build --path ${EXAMPLES_PATH}/ --target esp32s2 --manifest-file ${MANIFEST_FILE}
23+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade
3024
- name: Build USB Device examples
3125
shell: bash
3226
run: |
3327
. ${IDF_PATH}/export.sh
34-
export EXAMPLES_PATH="${IDF_PATH}/examples/peripherals/usb/device"
35-
export MANIFEST_FILE="${IDF_PATH}/examples/peripherals/.build-test-rules.yml"
36-
python .github/ci/override_managed_component.py tinyusb . ${EXAMPLES_PATH}/tusb_*
37-
idf-build-apps find --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
38-
idf-build-apps build --path ${EXAMPLES_PATH}/ --recursive --target esp32s2 --manifest-file ${MANIFEST_FILE}
28+
python .github/ci/override_managed_component.py tinyusb . ${IDF_PATH}/examples/peripherals/usb/device/tusb_*
29+
python .github/ci/override_managed_component.py tinyusb . ${IDF_PATH}/examples/network/sta2eth
30+
cd ${IDF_PATH}
31+
idf-build-apps find --config-file ${CONFIG_PATH}
32+
idf-build-apps build --config-file ${CONFIG_PATH}
3933
- uses: actions/upload-artifact@v4
4034
with:
4135
# We upload only the USB Device example binaries to run them on the target
4236
name: usb_device_tusb_apps_bin_${{ matrix.idf_ver }}
4337
path: |
44-
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/bootloader/bootloader.bin
45-
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/partition_table/partition-table.bin
46-
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/tusb_*.bin
47-
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/tusb_*.elf
48-
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/flasher_args.json
49-
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build/config/sdkconfig.json
38+
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/bootloader/bootloader.bin
39+
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/partition_table/partition-table.bin
40+
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/tusb_*.bin
41+
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/tusb_*.elf
42+
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/flasher_args.json
43+
/opt/esp/idf/examples/peripherals/usb/device/tusb_*/build_*/config/sdkconfig.json
5044
if-no-files-found: error
5145
run-target:
5246
name: Run USB Device examples

.github/workflows/build_iot_examples.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
shell: bash
2828
run: |
2929
. ${IDF_PATH}/export.sh
30-
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps pyyaml --upgrade
30+
pip install --no-cache-dir idf-component-manager>=2.1.2 idf-build-apps==2.13.1 pyyaml --upgrade
3131
python .github/ci/override_managed_component.py tinyusb . ${{ env.EXAMPLE_PATH }}/
32-
idf-build-apps find --paths ${{ env.EXAMPLE_PATH }} --target all --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}
33-
idf-build-apps build --paths ${{ env.EXAMPLE_PATH }} --target all --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}
32+
idf-build-apps find --paths ${{ env.EXAMPLE_PATH }} --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}
33+
idf-build-apps build --paths ${{ env.EXAMPLE_PATH }} --manifest-file ${{ env.MANIFEST_PATH }} --manifest-rootpath ${{ env.ESP_IOT_PATH }}

0 commit comments

Comments
 (0)