Skip to content

Commit bd937ab

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

File tree

1 file changed

+206
-0
lines changed

1 file changed

+206
-0
lines changed

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

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

0 commit comments

Comments
 (0)