Skip to content

Commit

Permalink
usb_host: Build USB test app in CI
Browse files Browse the repository at this point in the history
Relates to #69

This commit is a good reason why #16 should be addressed
  • Loading branch information
tore-espressif committed Jul 13, 2022
1 parent b151da9 commit 6c6722e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/build_test_app_usb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build USB Test Application

on:
schedule:
- cron: '0 0 * * *' # Once per day at midnight
pull_request:
types: [opened, reopened, synchronize]

jobs:
build:
name: Build USB Test App
strategy:
fail-fast: false
matrix:
idf_ver: ["release-v4.4", "latest"]
idf_target: ["esp32s2", "esp32s3"]
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- uses: actions/checkout@v3
- name: Build USB Test Application
env:
IDF_TARGET: ${{ matrix.idf_target }}
shell: bash
working-directory: usb/test_app
run: |
. ${IDF_PATH}/export.sh
idf.py build
- uses: actions/upload-artifact@v2
with:
name: usb_test_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
path: |
usb/test_app/build/bootloader/bootloader.bin
usb/test_app/build/partition_table/partition-table.bin
usb/test_app/build/usb_test_app.bin
usb/test_app/build/usb_test_app.elf
usb/test_app/build/flasher_args.json
4 changes: 2 additions & 2 deletions usb/test_app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)

set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/peripherals/usb/host/cdc/common
set(EXTRA_COMPONENT_DIRS ../usb_host_cdc_acm
$ENV{IDF_PATH}/examples/peripherals/usb/host/msc/components/)

# Set the components to include the tests for.
set(TEST_COMPONENTS "cdc_acm_host" "msc" CACHE STRING "List of components to test")
set(TEST_COMPONENTS "usb_host_cdc_acm" "msc" CACHE STRING "List of components to test")
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(usb_test_app)
2 changes: 1 addition & 1 deletion usb/usb_host_cdc_acm/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
idf_component_register(SRCS "test_cdc_acm_host.c" "usb_device.c"
INCLUDE_DIRS "."
REQUIRES cdc_acm_host tinyusb unity)
REQUIRES usb_host_cdc_acm tinyusb unity)

0 comments on commit 6c6722e

Please sign in to comment.