Skip to content

Commit 7dd4c90

Browse files
committed
ci(cmake): use matrix to build against one board per serie
C0 not added as not enough space for the example. Signed-off-by: Frederic Pillon <[email protected]>
1 parent 35d80db commit 7dd4c90

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

Diff for: .github/workflows/Cmake.yml

+22-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
pull_request:
1616
paths-ignore:
1717
- .github/**
18-
- '!.github/workflows/Arduino-build.yml'
18+
- '!.github/workflows/Cmake.yml'
1919
- '*.json'
2020
- '**.md'
2121
- keywords.txt
@@ -28,6 +28,26 @@ jobs:
2828
name: Check CMake usage
2929
runs-on: ubuntu-latest
3030

31+
strategy:
32+
matrix:
33+
boardname:
34+
- NUCLEO_F091RC
35+
- NUCLEO_F103RB
36+
- NUCLEO_F207ZG
37+
- NUCLEO_F303RE
38+
- NUCLEO_F411RE
39+
- NUCLEO_F767ZI
40+
- NUCLEO_G0B1RE
41+
- NUCLEO_G474RE
42+
- NUCLEO_H743ZI2
43+
- NUCLEO_L073RZ
44+
- NUCLEO_L152RE
45+
- NUCLEO_L476RG
46+
- NUCLEO_L552ZE_Q
47+
- NUCLEO_U575ZI_Q
48+
- P_NUCLEO_WB55RG
49+
- NUCLEO_WL55JC1
50+
3151
steps:
3252
- name: Checkout
3353
uses: actions/checkout@main
@@ -38,7 +58,7 @@ jobs:
3858
- name: Configure
3959
run: |
4060
mkdir build
41-
cmake -S CI/build/examples/BareMinimum -B ./build -G Ninja
61+
cmake -DBOARDNAME=${{ matrix.boardname }} -S CI/build/examples/BareMinimum -B ./build -G Ninja
4262
4363
- name: Build example
4464
working-directory: '${{ github.workspace }}/build'

Diff for: CI/build/examples/BareMinimum/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ cmake_minimum_required(VERSION 3.21)
1010
file(REAL_PATH "../../../../" CORE_PATH EXPAND_TILDE)
1111
file(TO_CMAKE_PATH "${CORE_PATH}" CORE_PATH)
1212

13-
set(BOARDNAME "NUCLEO_F103RB")
13+
if(NOT DEFINED BOARDNAME)
14+
MESSAGE(STATUS "BOARDNAME is not defined set it to NUCLEO_F103RB")
15+
set(BOARDNAME "NUCLEO_F103RB")
16+
endif()
1417

1518
list(APPEND CMAKE_MODULE_PATH ${CORE_PATH}/cmake)
1619
set(CMAKE_TOOLCHAIN_FILE toolchain)

0 commit comments

Comments
 (0)