Skip to content

Commit d05cd88

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

File tree

1 file changed

+262
-0
lines changed

1 file changed

+262
-0
lines changed
Lines changed: 262 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,262 @@
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+
libraries: |
134+
- name: ArduinoBLE
135+
version: 1.4.0
136+
# Opta
137+
- board:
138+
type: mbed_opta
139+
platforms: |
140+
# Install mbed_opta platform via Boards Manager
141+
- name: arduino:mbed_opta
142+
version: 4.3.1
143+
libraries: |
144+
- name: ArduinoECCX08
145+
version: 1.3.9
146+
- name: ArduinoBearSSL
147+
version: 1.7.6
148+
- name: ArduinoBLE
149+
version: 1.4.0
150+
# GIGA
151+
- board:
152+
type: mbed_giga
153+
platforms: |
154+
# Install mbed_giga platform via Boards Manager
155+
- name: arduino:mbed_giga
156+
version: 4.3.1
157+
libraries: |
158+
- name: ArduinoECCX08
159+
version: 1.3.9
160+
- name: ArduinoBearSSL
161+
version: 1.7.6
162+
- name: ArduinoBLE
163+
version: 1.4.0
164+
# Portenta C33
165+
- board:
166+
type: renesas_portenta
167+
platforms: |
168+
# Install renesas_portenta platform via Boards Manager
169+
- name: arduino:renesas_portenta
170+
version: 1.4.1
171+
libraries: |
172+
- source-url: https://github.com/pennam/Arduino_Cellular.git
173+
version: bfbd25791d200b113d640e16eed43ce547ab0b0c
174+
- name: StreamDebugger
175+
version: 1.0.1
176+
- name: TinyGsm
177+
version: 0.12.0
178+
- name: ArduinoBLE
179+
version: 1.4.0
180+
# UNO R4 WiFi
181+
- board:
182+
type: renesas_uno
183+
platforms: |
184+
# Install renesas_uno platform via Boards Manager
185+
- name: arduino:renesas_uno
186+
version: 1.4.1
187+
libraries: |
188+
- name: ArduinoBLE
189+
version: 1.4.0
190+
steps:
191+
- name: Checkout
192+
uses: actions/checkout@v4
193+
- name: Clear cache
194+
run: |
195+
rm -rf ~/.cache
196+
- name: Compile production provisioning sketch
197+
uses: arduino/compile-sketches@v1
198+
with:
199+
github-token: ${{ secrets.GITHUB_TOKEN }}
200+
platforms: ${{ matrix.platforms }}
201+
fqbn: ${{ matrix.board.fqbn }}
202+
libraries: |
203+
${{ env.UNIVERSAL_LIBRARIES }}
204+
${{ matrix.libraries }}
205+
sketch-paths: |
206+
${{ env.UNIVERSAL_SKETCH_PATHS }}
207+
${{ matrix.sketch-paths }}
208+
enable-deltas-report: "false"
209+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
210+
cli-compile-flags: |
211+
- --clean
212+
- --verbose
213+
- --output-dir
214+
- ${{ runner.temp }}/provisioning-prod
215+
- name: Compile staging provisioning sketch
216+
uses: arduino/compile-sketches@v1
217+
with:
218+
github-token: ${{ secrets.GITHUB_TOKEN }}
219+
platforms: ${{ matrix.platforms }}
220+
fqbn: ${{ matrix.board.fqbn }}
221+
libraries: |
222+
${{ env.UNIVERSAL_LIBRARIES }}
223+
${{ matrix.libraries }}
224+
sketch-paths: |
225+
${{ env.UNIVERSAL_SKETCH_PATHS }}
226+
${{ matrix.sketch-paths }}
227+
enable-deltas-report: "false"
228+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
229+
cli-compile-flags: |
230+
- --clean
231+
- --verbose
232+
- --build-property
233+
- "compiler.cpp.extra_flags=-DCOMPILE_TEST=1"
234+
- --output-dir
235+
- ${{ runner.temp }}/provisioning-staging
236+
- name: Write data to size trends report spreadsheet
237+
# Update report on every push to the master branch
238+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
239+
uses: arduino/report-size-trends@main
240+
with:
241+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
242+
google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
243+
spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4
244+
245+
- name: Save memory usage change report as artifact
246+
if: github.event_name == 'pull_request'
247+
uses: actions/upload-artifact@v4
248+
with:
249+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
250+
path: ${{ env.SKETCHES_REPORTS_PATH }}
251+
252+
- name: Save production artifact
253+
uses: actions/upload-artifact@v4
254+
with:
255+
name: provisioning-prod-${{ matrix.board.artifact-name-suffix }}
256+
path: ${{ runner.temp }}/provisioning-prod/
257+
258+
- name: Save staging artifact
259+
uses: actions/upload-artifact@v4
260+
with:
261+
name: provisioning-staging-${{ matrix.board.artifact-name-suffix }}
262+
path: ${{ runner.temp }}/provisioning-staging/

0 commit comments

Comments
 (0)