Skip to content

Commit bd37bb2

Browse files
committed
Add dedicated workflow to compile provisioning binaries
1 parent 370ef63 commit bd37bb2

File tree

1 file changed

+208
-0
lines changed

1 file changed

+208
-0
lines changed
+208
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
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+
- source-url: https://github.com/fabik111/Arduino_ConnectionHandler.git
25+
version: 0314cf54593029aea05bb8c179e40a26128f7d67
26+
- name: ArduinoBLE
27+
- name: ArduinoECCX08
28+
- name: ArduinoBearSSL
29+
- name: ArduinoHttpClient
30+
- name: Arduino_DebugUtils
31+
- name: ArduinoMqttClient
32+
- source-url: https://github.com/fabik111/Arduino_SecureElement.git
33+
version: f5a23964a1c70048e48d5ed2d2657004446f0e3d
34+
- source-url: https://github.com/fabik111/Arduino_CloudUtils.git
35+
version: a8b52eaf500c63b2e8bd3e4b6f6c77b70fc3e65d
36+
- source-url: https://github.com/arduino-libraries/Arduino_KVStore.git
37+
- source-url: https://github.com/arduino-libraries/Arduino_UniqueHWId.git
38+
- source-url: https://github.com/arduino-libraries/Arduino_NetworkConfigurator.git
39+
# sketch paths to compile (recursive) for all boards
40+
UNIVERSAL_SKETCH_PATHS: |
41+
- examples/utility/Provisioning_2.0
42+
SKETCHES_REPORTS_PATH: sketches-reports
43+
44+
strategy:
45+
fail-fast: false
46+
47+
matrix:
48+
board:
49+
- fqbn: arduino:samd:mkrwifi1010
50+
type: nina
51+
artifact-name-suffix: arduino-samd-mkrwifi1010
52+
- fqbn: arduino:samd:nano_33_iot
53+
type: nina
54+
artifact-name-suffix: arduino-samd-nano_33_iot
55+
- fqbn: arduino:mbed_portenta:envie_m7
56+
type: mbed_portenta
57+
artifact-name-suffix: arduino-mbed_portenta-envie_m7
58+
- fqbn: arduino:mbed_nano:nanorp2040connect
59+
type: nina
60+
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
61+
- fqbn: arduino:mbed_nicla:nicla_vision
62+
type: mbed_nicla
63+
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
64+
- fqbn: arduino:mbed_opta:opta
65+
type: mbed_opta
66+
artifact-name-suffix: arduino-mbed_opta-opta
67+
- fqbn: arduino:mbed_giga:giga
68+
type: mbed_giga
69+
artifact-name-suffix: arduino-mbed_giga-giga
70+
- fqbn: arduino:renesas_portenta:portenta_c33
71+
type: renesas_portenta
72+
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
73+
- fqbn: arduino:renesas_uno:unor4wifi
74+
type: renesas_uno
75+
artifact-name-suffix: arduino-renesas_uno-unor4wifi
76+
77+
# make board type-specific customizations to the matrix jobs
78+
include:
79+
# MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect
80+
- board:
81+
type: nina
82+
platforms: |
83+
# Install samd and mbed_nano platform via Boards Manager
84+
- name: arduino:samd
85+
- name: arduino:mbed_nano
86+
libraries: |
87+
- name: RTCZero
88+
- source-url: https://github.com/andreagilardoni/WiFiNINA.git
89+
version: 31616ac5a30f6281c68f982bc39800771b2fbaeb
90+
- name: Arduino_JSON
91+
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
92+
# Portenta
93+
- board:
94+
type: mbed_portenta
95+
platforms: |
96+
# Install mbed_portenta platform via Boards Manager
97+
- name: arduino:mbed_portenta
98+
libraries: |
99+
- name: Arduino_Cellular
100+
# Nicla Vision
101+
- board:
102+
type: mbed_nicla
103+
platforms: |
104+
# Install mbed_nicla platform via Boards Manager
105+
- name: arduino:mbed_nicla
106+
# Opta
107+
- board:
108+
type: mbed_opta
109+
platforms: |
110+
# Install mbed_opta platform via Boards Manager
111+
- name: arduino:mbed_opta
112+
# GIGA
113+
- board:
114+
type: mbed_giga
115+
platforms: |
116+
# Install mbed_giga platform via Boards Manager
117+
- name: arduino:mbed_giga
118+
# Portenta C33
119+
- board:
120+
type: renesas_portenta
121+
platforms: |
122+
# Install renesas_portenta platform via Boards Manager
123+
- name: arduino:renesas_portenta
124+
libraries: |
125+
- name: Arduino_Cellular
126+
# UNO R4 WiFi
127+
- board:
128+
type: renesas_uno
129+
platforms: |
130+
# Install renesas_uno platform via Boards Manager
131+
- name: arduino:renesas_uno
132+
133+
steps:
134+
- name: Checkout
135+
uses: actions/checkout@v4
136+
137+
- name: Compile production provisioning sketch
138+
uses: arduino/compile-sketches@v1
139+
with:
140+
github-token: ${{ secrets.GITHUB_TOKEN }}
141+
platforms: ${{ matrix.platforms }}
142+
fqbn: ${{ matrix.board.fqbn }}
143+
libraries: |
144+
${{ env.UNIVERSAL_LIBRARIES }}
145+
${{ matrix.libraries }}
146+
sketch-paths: |
147+
${{ env.UNIVERSAL_SKETCH_PATHS }}
148+
${{ matrix.sketch-paths }}
149+
enable-deltas-report: "true"
150+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
151+
cli-compile-flags: |
152+
- --board-options
153+
- "split=100_0"
154+
- --output-dir
155+
- ${{ runner.temp }}/provisioning-prod
156+
157+
- name: Compile staging provisioning sketch
158+
uses: arduino/compile-sketches@v1
159+
with:
160+
github-token: ${{ secrets.GITHUB_TOKEN }}
161+
platforms: ${{ matrix.platforms }}
162+
fqbn: ${{ matrix.board.fqbn }}
163+
libraries: |
164+
${{ env.UNIVERSAL_LIBRARIES }}
165+
${{ matrix.libraries }}
166+
sketch-paths: |
167+
${{ env.UNIVERSAL_SKETCH_PATHS }}
168+
${{ matrix.sketch-paths }}
169+
enable-deltas-report: "true"
170+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
171+
cli-compile-flags: |
172+
- --verbose
173+
- --board-options
174+
- "split=100_0"
175+
- --build-property
176+
- "build.extra_flags=-DCOMPILE_TEST=1"
177+
- --output-dir
178+
- ${{ runner.temp }}/provisioning-staging
179+
180+
- name: Write data to size trends report spreadsheet
181+
# Update report on every push to the master branch
182+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
183+
uses: arduino/report-size-trends@main
184+
with:
185+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
186+
google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
187+
spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4
188+
189+
- name: Save memory usage change report as artifact
190+
if: github.event_name == 'pull_request'
191+
uses: actions/upload-artifact@v4
192+
with:
193+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
194+
path: ${{ env.SKETCHES_REPORTS_PATH }}
195+
196+
- name: Save production artifact
197+
if: github.event_name == 'pull_request'
198+
uses: actions/upload-artifact@v4
199+
with:
200+
name: provisioning-prod-${{ matrix.board.artifact-name-suffix }}
201+
path: ${{ runner.temp }}/provisioning-prod/
202+
203+
- name: Save staging artifact
204+
if: github.event_name == 'pull_request'
205+
uses: actions/upload-artifact@v4
206+
with:
207+
name: provisioning-staging-${{ matrix.board.artifact-name-suffix }}
208+
path: ${{ runner.temp }}/provisioning-staging/

0 commit comments

Comments
 (0)