-
-
Notifications
You must be signed in to change notification settings - Fork 212
75 lines (57 loc) · 1.96 KB
/
PicoSDKBuild.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
name: PicoSDKBuild
env:
WORKSPACE_DIR: examples_for_picosdk
PROJECT_DIR: i2c
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**PicoSDKBuild.yml'
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.board }}@${{ matrix.sdk-version }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- { board: rp2350, sdk-version: 2.0.0, sdk-extras-version: sdk-2.0.0 }
- { board: rp2040, sdk-version: 2.0.0, sdk-extras-version: sdk-2.0.0 }
- { board: rp2040, sdk-version: 1.5.1, sdk-extras-version: sdk-1.5.1 }
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: install deps
run: |
sudo apt install ca-certificates build-essential avr-libc gcc-avr gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib libusb-1.0-0-dev cmake
- name: compile
run: |
cd ${{env.WORKSPACE_DIR}}
git clone -b ${{ matrix.sdk-version }} --depth 1 https://github.com/raspberrypi/pico-sdk
git clone -b ${{ matrix.sdk-extras-version }} --depth 1 https://github.com/raspberrypi/pico-extras
cd pico-sdk
git submodule update --init
cd ..
export PICO_SDK_PATH="$(pwd)/pico-sdk"
export PICO_SDK_EXTRAS_PATH="$(pwd)/pico-extras"
export PICO_PLATFORM="${{ matrix.board }}"
cp pico-sdk/external/pico_sdk_import.cmake ./
cp pico-extras/external/pico_extras_import.cmake ./pico_extras_import_optional.cmake
cd ${{env.PROJECT_DIR}}
ln -sv ../../../LovyanGFX LovyanGFX
mkdir -p build
cd build
cmake ..
make -j $(nproc)