Skip to content

Commit

Permalink
test ci with pico-examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Aug 2, 2023
1 parent 2021c62 commit 90f328c
Showing 1 changed file with 43 additions and 16 deletions.
59 changes: 43 additions & 16 deletions .github/workflows/cmake_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -72,14 +72,41 @@ jobs:
ref: develop
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 }}

- name: Build
run: python tools/build_cmake.py ${{ matrix.family }} -DCMAKE_BUILD_TYPE=MinSizeRel
# - name: Build
# 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

- name: Build pico-examples
if: matrix.family == 'rp2040'
env:
# for rp2040, there is no harm if defined for other families
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
PICO_EXAMPLES_PATH: ${{ github.workspace }}/pico-examples
run: |
# symlink tinyusb to pico-sdk
rm -rf $PICO_SDK_PATH/lib/tinyusb
ln -s ${{ github.workspace }} $PICO_SDK_PATH/lib/
# change CMakelists.txt to only build selected examples
cd $PICO_EXAMPLES_PATH
sed -i -r 's/add_subdirectory/#add_subdirectory/g' CMakeLists.txt
echo "" >> CMakeLists.txt
echo "add_subdirectory(usb/device/dev_hid_composite)" >> CMakeLists.txt
# TODO temporarily disable host examples since tinyusb API is changed
# echo "add_subdirectory(usb/host/host_cdc_msc_hid)" >> CMakeLists.txt
cmake -S . -B _build -G Ninja -DFAMILY=rp2040 -DBOARD=pico_sdk
cmake --build _build
# Upload binaries for hardware test with self-hosted
- name: Prepare rp2040 Artifacts
Expand Down

0 comments on commit 90f328c

Please sign in to comment.