-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (31 loc) · 1.24 KB
/
build.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
name: Build & Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
BUILD_TYPE: Release
PICO_SDK_VERSION: "1.5.1"
PIMORONI_PICO_VERSION: "1.21.0"
jobs:
build:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install deps
run: |
wget https://github.com/raspberrypi/pico-sdk/archive/refs/tags/${{env.PICO_SDK_VERSION}}.tar.gz -O /tmp/pico-sdk.tar.gz
wget https://github.com/pimoroni/pimoroni-pico/archive/refs/tags/v${{env.PIMORONI_PICO_VERSION}}.tar.gz -O /tmp/pimoroni-pico.tar.gz
tar -xf /tmp/pico-sdk.tar.gz
tar -xf /tmp/pimoroni-pico.tar.gz
rm /tmp/pico-sdk.tar.gz /tmp/pimoroni-pico.tar.gz
sudo apt-get install -y gcc-arm-none-eabi
- name: Configure CMake
env:
PICO_SDK_PATH: "${{github.workspace}}/pico-sdk-${{env.PICO_SDK_VERSION}}"
PIMORONI_PICO_PATH: "${{github.workspace}}/pimoroni-pico-${{env.PIMORONI_PICO_VERSION}}"
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DPIMORONI_PICO_PATH=$PIMORONI_PICO_PATH
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}