-
-
Notifications
You must be signed in to change notification settings - Fork 26
212 lines (203 loc) · 7.22 KB
/
compile-examples.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
name: Compile Examples
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/compile-examples.ya?ml"
- "Arduino_BHY2/library.properties"
- "Arduino_BHY2/examples/**"
- "Arduino_BHY2/src/**"
- "Arduino_BHY2Host/library.properties"
- "Arduino_BHY2Host/examples/**"
- "Arduino_BHY2Host/src/**"
pull_request:
paths:
- ".github/workflows/compile-examples.ya?ml"
- "Arduino_BHY2/library.properties"
- "Arduino_BHY2/examples/**"
- "Arduino_BHY2/src/**"
- "Arduino_BHY2Host/library.properties"
- "Arduino_BHY2Host/examples/**"
- "Arduino_BHY2Host/src/**"
schedule:
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:
jobs:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest
env:
SKETCHES_REPORTS_PATH: sketches-reports
strategy:
fail-fast: false
matrix:
board:
- fqbn: arduino:mbed_nicla:nicla_sense
platforms: |
- name: arduino:mbed_nicla
bhy2: true
libraries: |
- name: PacketSerial
bhy2host: false
arduinoiotcloud: false
passthrough: false
blebridge: false
artifact-name-suffix: arduino-mbed_nicla-nicla_sense
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
libraries: |
- name: Arduino_Portenta_OTA
bhy2: false
bhy2host: true
arduinoiotcloud: true
passthrough: true
blebridge: true
artifact-name-suffix: arduino-mbed_portenta-envie_m7
- fqbn: arduino:samd:mkrzero
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrzero
- fqbn: arduino:samd:mkrwifi1010
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: true
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrwifi1010
- fqbn: arduino:samd:mkrwan1310
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrwan1310
- fqbn: arduino:samd:mkrgsm1400
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrgsm1400
- fqbn: arduino:samd:mkrnb1500
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrnb1500
# Make board type-specific customizations to the matrix jobs
include:
- board:
# Boards supported by Arduino_BHY2 library
bhy2: true
# Install these libraries
bhy2-libraries: |
# Install the library from the local path.
- source-path: Arduino_BHY2
- name: ArduinoBLE
# Compile these sketches
bhy2-sketch-paths: |
- Arduino_BHY2/examples
- board:
bhy2: false
bhy2-libraries: ""
bhy2-sketch-paths: ""
- board:
# Boards supported by Arduino_BHY2Host library
bhy2host: true
# Install these libraries
bhy2host-libraries: |
# Install the library from the local path.
- source-path: Arduino_BHY2Host
- name: ArduinoBLE
# Compile these sketches
bhy2host-sketch-paths: |
- Arduino_BHY2Host/examples/Accelerometer
- Arduino_BHY2Host/examples/Orientation
- Arduino_BHY2Host/examples/Temperature
- board:
bhy2host: false
bhy2host-libraries: ""
bhy2host-sketch-paths: ""
- board:
# Boards supported by Arduino IoT Cloud
arduinoiotcloud: true
# Install these libraries in addition to the universal ones
arduinoiotcloud-libraries: |
- name: ArduinoIoTCloud
- name: Arduino_Cellular
# Compile these sketches in addition to the universal ones
arduinoiotcloud-sketch-paths: |
- Arduino_BHY2Host/examples/Nicla_IoT_Bridge
- board:
arduinoiotcloud: false
arduinoiotcloud-libraries: ""
arduinoiotcloud-sketch-paths: ""
- board:
# Boards with passthrough capability
passthrough: true
# Compile these sketches in addition to the universal ones
passthrough-sketch-paths: |
- Arduino_BHY2Host/examples/Passthrough
- board:
passthrough: false
passthrough-sketch-paths: ""
- board:
# Boards supported by Arduino_BHY2 library
blebridge: true
# Install these libraries
blebridge-libraries: |
- name: ArduinoIoTCloud
- name: Arduino_Cellular
# Compile these sketches
blebridge-sketch-paths: |
- Arduino_BHY2Host/examples/Portenta_BLE_Bridge
- board:
blebridge: false
blebridge-libraries: ""
blebridge-sketch-paths: ""
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
platforms: ${{ matrix.board.platforms }}
libraries: |
# Board-specific libraries
${{ matrix.bhy2-libraries }}
${{ matrix.bhy2host-libraries }}
${{ matrix.board.libraries }}
${{ matrix.arduinoiotcloud-libraries }}
${{ matrix.blebridge-libraries }}
sketch-paths: |
${{ matrix.bhy2-sketch-paths }}
${{ matrix.bhy2host-sketch-paths }}
${{ matrix.arduinoiotcloud-sketch-paths }}
${{ matrix.blebridge-sketch-paths }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Save sketches report as workflow artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: sketches-report-${{ matrix.board.artifact-name-suffix }}