Add new branches to workflow #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build_on_push | |
on: | |
push: | |
branches: [ "main", "rp2350_ice", "pico2-ice_develop" ] | |
pull_request: | |
branches: [ "main", "develop", "pico2-ice_develop" ] | |
workflow_dispatch: | |
jobs: | |
firmware: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
cmake_build_type: [Debug] | |
pico_board: ["pico_ice", "pico2_ice"] | |
example: | |
- rp2_blinky | |
- rp2_blinky_cplusplus | |
- rp2_cram | |
- rp2_flash | |
- rp2_flash_repl | |
- rp2_fpga | |
- rp2_fpga_io | |
- rp2_hello_world | |
- rp2_sram | |
- rp2_usb_fpga | |
- rp2_usb_keyboard | |
- rp2_usb_spi | |
- rp2_usb_uart | |
- rp2_usb_uf2 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: arm-none-eabi-gcc GNU Arm Embedded Toolchain | |
uses: carlosperate/[email protected] | |
- name: Setup cmake | |
uses: jwlawson/actions-setup-cmake@v2 | |
- name: Cache Submodules | |
id: cache-submodules | |
uses: actions/cache@v4 | |
with: | |
path: lib | |
key: ${{ runner.os }}-build-${{ hashFiles('lib/**') }} | |
restore-keys: | | |
${{ runner.os }}-build- | |
- name: Fetch submodules | |
if: steps.cache-submodules.outputs.cache-hit != 'true' | |
run: | | |
git submodule update --init | |
git -C lib/pico-sdk submodule update --init | |
- name: Build each example on every commit | |
run: | | |
cd examples/${{ matrix.example }} | |
mkdir -p build | |
cd build | |
cmake -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DPICO_BOARD=${{ matrix.pico_board }} .. | |
make -j4 |