forked from paulocode/picostation
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (42 loc) · 1.37 KB
/
cmake.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
name: CMake
on: [push, pull_request]
env:
BUILD_TYPE: Release
PICO_SDK_VERSION: 2.0.0
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
board: [pico, pico2]
steps:
- name: Checkout picostation
uses: actions/checkout@v4
with:
path: picostation
- name: Checkout pico-sdk v${{ env.PICO_SDK_VERSION }}
uses: actions/checkout@v4
with:
repository: raspberrypi/pico-sdk
ref: ${{ env.PICO_SDK_VERSION }}
path: pico-sdk
submodules: true
- name: Setup latest cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Install latest Arm GNU Toolchain (arm-none-eabi-gcc)
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
path-env-var: PICO_TOOLCHAIN_PATH
- name: Configure CMake
working-directory: ${{github.workspace}}/picostation
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
run: cmake -B build . -DPICO_BOARD=${{ matrix.board }} -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: ${{github.workspace}}/picostation/build
run: cmake --build . --parallel $(nproc)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: picostation-${{ matrix.board }}
path: picostation/build/picostation.*