Skip to content

Workflow update

Workflow update #212

Workflow file for this run

name: build_on_push
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "develop" ]
workflow_dispatch:
jobs:
firmware:
runs-on: ubuntu-24.04
strategy:
matrix:
cmake_build_type: [Debug, Release]
example:
- pico_blinky
- pico_blinky_cplusplus
- pico_cram
- pico_flash
- pico_flash_repl
- pico_fpga
- pico_fpga_io
- pico_hello_world
- pico_sram
- pico_usb_fpga
- pico_usb_keyboard
- pico_usb_spi
- pico_usb_uart
- pico_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
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 }} ..
make