-
Notifications
You must be signed in to change notification settings - Fork 16
76 lines (66 loc) · 2.25 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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", platform: "rp2040"}, {board: "pico2_ice", platform: "rp2350"}, {board: "pico2_ice", platform: "rp2350-riscv"}]
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
if: ${{ !contains(matrix.pico.platform, "riscv") }}
uses: carlosperate/[email protected]
- name: riscv Toolchain
if: ${{ contains(matrix.pico.platform, "riscv") }}
uses: ConorMacBride/install-package@v1
with:
apt: gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf
- name: riscv Toolchain env
if: ${{ contains(matrix.pico.platform, "riscv") }}
run: |
echo "PICO_GCC_TRIPLE=riscv64-unknown-elf" >> $GITHUB_ENV
- 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 }} -DPICO_PLATFORM=${{ matrix.pico.platform }} ..
make -j4