Skip to content

Commit bdd9c6f

Browse files
committed
add compile provisioning sketch flow
1 parent 29edf75 commit bdd9c6f

File tree

1 file changed

+258
-0
lines changed

1 file changed

+258
-0
lines changed
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
name: Compile Provisioning
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-provisioning.yml"
7+
- "examples/**"
8+
- "src/**"
9+
push:
10+
paths:
11+
- ".github/workflows/compile-provisioning.yml"
12+
- "examples/**"
13+
- "src/**"
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
19+
env:
20+
# libraries to install for all boards
21+
UNIVERSAL_LIBRARIES: |
22+
# Install the ArduinoIoTCloud library from the repository
23+
- source-path: ./
24+
- name: ArduinoHttpClient
25+
version: 0.6.1
26+
- name: Arduino_DebugUtils
27+
version: 1.4.0
28+
- name: ArduinoMqttClient
29+
version: 0.1.8
30+
- name: Arduino_KVStore
31+
version: 1.0.0
32+
- source-url: https://github.com/pennam/Arduino_ConnectionHandler.git
33+
version: 0f0f4a4ce718fcf2066a092a92cc2fdcd4d8bedd
34+
- name: Arduino_SecureElement
35+
version: 0.4.0
36+
- name: Arduino_CloudUtils
37+
version: 1.1.1
38+
- source-url: https://github.com/arduino-libraries/Arduino_UniqueHWId.git
39+
version: 7e1bfeb586cac00f043c39997a1e9937ed8152b0
40+
- source-url: https://github.com/arduino-libraries/Arduino_NetworkConfigurator.git
41+
version: 3499628000f2b652e856db406e4e02140bf267a6
42+
# sketch paths to compile (recursive) for all boards
43+
UNIVERSAL_SKETCH_PATHS: |
44+
- examples/utility/Provisioning_2.0
45+
SKETCHES_REPORTS_PATH: sketches-reports
46+
47+
strategy:
48+
fail-fast: false
49+
50+
matrix:
51+
board:
52+
- fqbn: arduino:samd:mkrwifi1010
53+
type: nina
54+
artifact-name-suffix: arduino-samd-mkrwifi1010
55+
- fqbn: arduino:samd:nano_33_iot
56+
type: nina
57+
artifact-name-suffix: arduino-samd-nano_33_iot
58+
- fqbn: arduino:mbed_portenta:envie_m7:split=100_0
59+
type: mbed_portenta
60+
artifact-name-suffix: arduino-mbed_portenta-envie_m7
61+
- fqbn: arduino:mbed_nano:nanorp2040connect
62+
type: nina
63+
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
64+
- fqbn: arduino:mbed_nicla:nicla_vision
65+
type: mbed_nicla
66+
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
67+
- fqbn: arduino:mbed_opta:opta
68+
type: mbed_opta
69+
artifact-name-suffix: arduino-mbed_opta-opta
70+
- fqbn: arduino:mbed_giga:giga
71+
type: mbed_giga
72+
artifact-name-suffix: arduino-mbed_giga-giga
73+
- fqbn: arduino:renesas_portenta:portenta_c33
74+
type: renesas_portenta
75+
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
76+
- fqbn: arduino:renesas_uno:unor4wifi
77+
type: renesas_uno
78+
artifact-name-suffix: arduino-renesas_uno-unor4wifi
79+
80+
# make board type-specific customizations to the matrix jobs
81+
include:
82+
# MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect
83+
- board:
84+
type: nina
85+
platforms: |
86+
# Install samd and mbed_nano platform via Boards Manager
87+
- name: arduino:samd
88+
version: 1.8.14
89+
- name: arduino:mbed_nano
90+
version: 4.3.1
91+
libraries: |
92+
- name: RTCZero
93+
version: 1.6.0
94+
- name: ArduinoECCX08
95+
version: 1.3.9
96+
- name: Adafruit SleepyDog Library
97+
version: 1.6.5
98+
- name: ArduinoBearSSL
99+
version: 1.7.6
100+
- source-url: https://github.com/pennam/WiFiNINA.git
101+
version: b9a8d705f85fef8c19862c32e314367d4bba5734
102+
- source-url: https://github.com/arduino-libraries/SpiNINA.git
103+
version: 4c8f2956b1b9cd421583393421c6c9276ba27614
104+
- source-url: https://github.com/pennam/ArduinoBLE.git
105+
version: 5915fa2df776e6eb7e9e5afd896ed3d1c048c9c0
106+
# Portenta
107+
- board:
108+
type: mbed_portenta
109+
platforms: |
110+
# Install mbed_portenta platform via Boards Manager
111+
- name: arduino:mbed_portenta
112+
version: 4.3.1
113+
libraries: |
114+
- source-url: https://github.com/pennam/Arduino_Cellular.git
115+
version: bfbd25791d200b113d640e16eed43ce547ab0b0c
116+
- name: ArduinoECCX08
117+
version: 1.3.9
118+
- name: StreamDebugger
119+
version: 1.0.1
120+
- name: TinyGsm
121+
version: 0.12.0
122+
- name: ArduinoBearSSL
123+
version: 1.7.6
124+
- name: ArduinoBLE
125+
version: 1.4.0
126+
# Nicla Vision
127+
- board:
128+
type: mbed_nicla
129+
platforms: |
130+
# Install mbed_nicla platform via Boards Manager
131+
- name: arduino:mbed_nicla
132+
version: 4.3.1
133+
# Opta
134+
- board:
135+
type: mbed_opta
136+
platforms: |
137+
# Install mbed_opta platform via Boards Manager
138+
- name: arduino:mbed_opta
139+
version: 4.3.1
140+
libraries: |
141+
- name: ArduinoECCX08
142+
version: 1.3.9
143+
- name: ArduinoBearSSL
144+
version: 1.7.6
145+
- name: ArduinoBLE
146+
version: 1.4.0
147+
# GIGA
148+
- board:
149+
type: mbed_giga
150+
platforms: |
151+
# Install mbed_giga platform via Boards Manager
152+
- name: arduino:mbed_giga
153+
version: 4.3.1
154+
libraries: |
155+
- name: ArduinoECCX08
156+
version: 1.3.9
157+
- name: ArduinoBearSSL
158+
version: 1.7.6
159+
- name: ArduinoBLE
160+
version: 1.4.0
161+
# Portenta C33
162+
- board:
163+
type: renesas_portenta
164+
platforms: |
165+
# Install renesas_portenta platform via Boards Manager
166+
- name: arduino:renesas_portenta
167+
version: 1.4.1
168+
libraries: |
169+
- source-url: https://github.com/pennam/Arduino_Cellular.git
170+
version: bfbd25791d200b113d640e16eed43ce547ab0b0c
171+
- name: StreamDebugger
172+
version: 1.0.1
173+
- name: TinyGsm
174+
version: 0.12.0
175+
- name: ArduinoBLE
176+
version: 1.4.0
177+
# UNO R4 WiFi
178+
- board:
179+
type: renesas_uno
180+
platforms: |
181+
# Install renesas_uno platform via Boards Manager
182+
- name: arduino:renesas_uno
183+
version: 1.4.1
184+
- name: ArduinoBLE
185+
version: 1.4.0
186+
steps:
187+
- name: Checkout
188+
uses: actions/checkout@v4
189+
- name: Clear cache
190+
run: |
191+
rm -rf ~/.cache
192+
- name: Compile production provisioning sketch
193+
uses: arduino/compile-sketches@v1
194+
with:
195+
github-token: ${{ secrets.GITHUB_TOKEN }}
196+
platforms: ${{ matrix.platforms }}
197+
fqbn: ${{ matrix.board.fqbn }}
198+
libraries: |
199+
${{ env.UNIVERSAL_LIBRARIES }}
200+
${{ matrix.libraries }}
201+
sketch-paths: |
202+
${{ env.UNIVERSAL_SKETCH_PATHS }}
203+
${{ matrix.sketch-paths }}
204+
enable-deltas-report: "false"
205+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
206+
cli-compile-flags: |
207+
- --clean
208+
- --verbose
209+
- --output-dir
210+
- ${{ runner.temp }}/provisioning-prod
211+
- name: Compile staging provisioning sketch
212+
uses: arduino/compile-sketches@v1
213+
with:
214+
github-token: ${{ secrets.GITHUB_TOKEN }}
215+
platforms: ${{ matrix.platforms }}
216+
fqbn: ${{ matrix.board.fqbn }}
217+
libraries: |
218+
${{ env.UNIVERSAL_LIBRARIES }}
219+
${{ matrix.libraries }}
220+
sketch-paths: |
221+
${{ env.UNIVERSAL_SKETCH_PATHS }}
222+
${{ matrix.sketch-paths }}
223+
enable-deltas-report: "false"
224+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
225+
cli-compile-flags: |
226+
- --clean
227+
- --verbose
228+
- --build-property
229+
- "compiler.cpp.extra_flags=-DCOMPILE_TEST=1"
230+
- --output-dir
231+
- ${{ runner.temp }}/provisioning-staging
232+
- name: Write data to size trends report spreadsheet
233+
# Update report on every push to the master branch
234+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
235+
uses: arduino/report-size-trends@main
236+
with:
237+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
238+
google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
239+
spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4
240+
241+
- name: Save memory usage change report as artifact
242+
if: github.event_name == 'pull_request'
243+
uses: actions/upload-artifact@v4
244+
with:
245+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
246+
path: ${{ env.SKETCHES_REPORTS_PATH }}
247+
248+
- name: Save production artifact
249+
uses: actions/upload-artifact@v4
250+
with:
251+
name: provisioning-prod-${{ matrix.board.artifact-name-suffix }}
252+
path: ${{ runner.temp }}/provisioning-prod/
253+
254+
- name: Save staging artifact
255+
uses: actions/upload-artifact@v4
256+
with:
257+
name: provisioning-staging-${{ matrix.board.artifact-name-suffix }}
258+
path: ${{ runner.temp }}/provisioning-staging/

0 commit comments

Comments
 (0)