forked from nRF24/RF24Mesh
-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (120 loc) · 4.18 KB
/
build_rp2xxx.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Pico SDK build
on:
push:
paths:
- ".github/workflows/build_rp2xxx.yml"
- "*.h"
- "*.cpp"
- "CMakeLists.txt"
- "cmake/"
- "examples_pico/*"
pull_request:
types: [opened, reopened]
paths:
- ".github/workflows/build_rp2xxx.yml"
- "*.h"
- "*.cpp"
- "CMakeLists.txt"
- "cmake/**"
- "examples_pico/*"
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
check_formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
# Ubuntu 20.04.4 LTS reunners ship with clang-tools v12
# - name: Install clang-tools
# uses: KyleMayes/install-llvm-action@v1
# with:
# version: 12
- name: Install linter python package
run: python3 -m pip install git+https://github.com/cpp-linter/cpp-linter-action@v1
- name: run linter as a python package
id: linter
run: |
cpp-linter \
--version=12 \
--style=file \
--tidy-checks='-*' \
--files-changed-only='False' \
--ignore='!examples_pico|'
- name: Linter checks failed?
if: steps.linter.outputs.checks-failed > 0
run: exit 1
build:
needs: check_formatting
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- "pico"
- "adafruit_feather_rp2040"
- "adafruit_itsybitsy_rp2040"
- "adafruit_qtpy_rp2040"
- "pimoroni_tiny2040" # examples require PicoSDK v1.2.0
- "sparkfun_micromod" # examples require PicoSDK v1.2.0
- "sparkfun_promicro" # examples require PicoSDK v1.2.0
- "sparkfun_thingplus" # examples require PicoSDK v1.2.0
# - "vgaboard" # examples require PicoSDK v1.2.0 (this can be enabled on request)
- "arduino_nano_rp2040_connect" # requires PicoSDK v1.2.0
- "pimoroni_picolipo_4mb" # requires PicoSDK v1.2.0
- "pimoroni_picolipo_16mb" # requires PicoSDK v1.2.0
- "pimoroni_pga2040" # requires PicoSDK v1.2.0
# - "pimoroni_keybow2040" # no SPI bus exposed
# - "pimoroni_picosystem" # SPI is reserved for LCD
steps:
- name: checkout RF24Mesh lib
uses: actions/checkout@v2
with:
path: RF24Mesh
- name: checkout RF24Network lib
uses: actions/checkout@v2
with:
repository: nRF24/RF24Network
path: RF24Network
- name: checkout RF24 lib
uses: actions/checkout@v2
with:
repository: nRF24/RF24
path: RF24
- name: Install toolchain
run: sudo apt update && sudo apt install gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential
- name: Clone pico-sdk
uses: actions/checkout@v2
with:
repository: raspberrypi/pico-sdk
# master branch is latest stable release
path: pico-sdk
clean: false
submodules: true
- name: Checkout pico-sdk submodules
working-directory: ${{ github.workspace }}/pico-sdk
run: git submodule update --init
- name: Create Build Environment
working-directory: ${{ github.workspace }}/RF24Mesh
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
run: cmake -E make_directory ${{ github.workspace }}/RF24Mesh/build
- name: Configure CMake
working-directory: ${{ github.workspace }}/RF24Mesh/build
env:
PICO_SDK_PATH: ${{ github.workspace }}/pico-sdk
run: cmake ../examples_pico -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DPICO_BOARD=${{ matrix.board }}
- name: Build
working-directory: ${{ github.workspace }}/RF24Mesh/build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: cmake --build . --config $BUILD_TYPE
- name: Save artifact
uses: actions/upload-artifact@v2
with:
name: examples_pico_${{ matrix.board }}
path: |
${{ github.workspace }}/RF24Mesh/build/*.uf2
${{ github.workspace }}/RF24Mesh/build/*.elf
# ${{ github.workspace }}/RF24Mesh/build/*.hex
# ${{ github.workspace }}/RF24Mesh/build/*.bin