From 8b28368e007cc93a4b7e79ff5d4c714e9b84436e Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 2 Aug 2023 18:27:42 +0700 Subject: [PATCH] test ci with pico-examples --- .github/workflows/cmake_arm.yml | 55 ++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 15 deletions(-) diff --git a/.github/workflows/cmake_arm.yml b/.github/workflows/cmake_arm.yml index 4d8cd5591e..e639cf8657 100644 --- a/.github/workflows/cmake_arm.yml +++ b/.github/workflows/cmake_arm.yml @@ -33,20 +33,20 @@ jobs: matrix: family: # Alphabetical order - - 'imxrt' - - 'kinetis_kl' - - 'lpc18' - - 'lpc55' - - 'mcx' - - 'ra' +# - 'imxrt' +# - 'kinetis_kl' +# - 'lpc18' +# - 'lpc55' +# - 'mcx' +# - 'ra' - 'rp2040' - - 'stm32f0' - - 'stm32f1' - - 'stm32f7' - - 'stm32g0' - - 'stm32g4' - - 'stm32h7' - - 'stm32l4' +# - 'stm32f0' +# - 'stm32f1' +# - 'stm32f7' +# - 'stm32g0' +# - 'stm32g4' +# - 'stm32h7' +# - 'stm32l4' steps: - name: Setup Python uses: actions/setup-python@v4 @@ -70,7 +70,15 @@ jobs: with: repository: raspberrypi/pico-sdk ref: develop - path: pico-sdk + path: ~/pico-sdk + + - name: Checkout pico-examples for rp2040 + if: matrix.family == 'rp2040' + uses: actions/checkout@v3 + with: + repository: raspberrypi/pico-examples + ref: develop + path: ~/pico-examples - name: Get Dependencies run: python3 tools/get_deps.py ${{ matrix.family }} @@ -79,7 +87,24 @@ jobs: run: python tools/build_cmake.py ${{ matrix.family }} -DCMAKE_BUILD_TYPE=MinSizeRel env: # for rp2040, there is no harm if defined for other families - PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk + PICO_SDK_PATH: ~/pico-sdk + + - name: Build pico-examples + if: matrix.family == 'rp2040' + env: + PICO_SDK_PATH: ~/pico-sdk + PICO_EXAMPLES_PATH: ~/pico-examples + run: | + ls + ls ${{ github.workspace }} + # symlink tinyusb to pico-sdk + ln -s ${{ github.workspace }} $PICO_SDK_PATH/lib/tinyusb + ls $PICO_SDK_PATH/lib + ls $PICO_SDK_PATH/lib/tinyusb + cd $PICO_EXAMPLES_PATH/usb/host + # build host example + cmake -S . -B _build -G Ninja -DFAMILY=rp2040 -DBOARD=pico_sdk -DCMAKE_BUILD_TYPE=MinSizeRel + cmake --build _build # Upload binaries for hardware test with self-hosted - name: Prepare rp2040 Artifacts