Skip to content

Commit 8c3cc4d

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

File tree

1 file changed

+202
-0
lines changed

1 file changed

+202
-0
lines changed

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

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

0 commit comments

Comments
 (0)