Skip to content

Commit 2b20110

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

File tree

1 file changed

+203
-0
lines changed

1 file changed

+203
-0
lines changed

Diff for: .github/workflows/compile-provisioning.yml

+203
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
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+
- --output-dir
153+
- ${{ runner.temp }}/provisioning-prod
154+
155+
- name: Compile staging provisioning sketch
156+
uses: arduino/compile-sketches@v1
157+
with:
158+
github-token: ${{ secrets.GITHUB_TOKEN }}
159+
platforms: ${{ matrix.platforms }}
160+
fqbn: ${{ matrix.board.fqbn }}
161+
libraries: |
162+
${{ env.UNIVERSAL_LIBRARIES }}
163+
${{ matrix.libraries }}
164+
sketch-paths: |
165+
${{ env.UNIVERSAL_SKETCH_PATHS }}
166+
${{ matrix.sketch-paths }}
167+
enable-deltas-report: "true"
168+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
169+
cli-compile-flags: |
170+
- --build-property
171+
- "build.extra_flags=-DCOMPILE_TEST=1"
172+
- --output-dir
173+
- ${{ runner.temp }}/provisioning-staging
174+
175+
- name: Write data to size trends report spreadsheet
176+
# Update report on every push to the master branch
177+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
178+
uses: arduino/report-size-trends@main
179+
with:
180+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
181+
google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
182+
spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4
183+
184+
- name: Save memory usage change report as artifact
185+
if: github.event_name == 'pull_request'
186+
uses: actions/upload-artifact@v4
187+
with:
188+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
189+
path: ${{ env.SKETCHES_REPORTS_PATH }}
190+
191+
- name: Save production artifact
192+
if: github.event_name == 'pull_request'
193+
uses: actions/upload-artifact@v4
194+
with:
195+
name: provisioning-prod-${{ matrix.board.artifact-name-suffix }}
196+
path: ${{ runner.temp }}/provisioning-prod/
197+
198+
- name: Save staging artifact
199+
if: github.event_name == 'pull_request'
200+
uses: actions/upload-artifact@v4
201+
with:
202+
name: provisioning-staging-${{ matrix.board.artifact-name-suffix }}
203+
path: ${{ runner.temp }}/provisioning-staging/

0 commit comments

Comments
 (0)