-
-
Notifications
You must be signed in to change notification settings - Fork 212
138 lines (127 loc) · 4.5 KB
/
compile-examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Compile Examples
on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "cores/**"
- "libraries/**"
- "variants/**"
- "boards.txt"
- "platform.txt"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "cores/**"
- "libraries/**"
- "variants/**"
- "boards.txt"
- "platform.txt"
jobs:
compile-examples:
runs-on: ubuntu-latest
env:
# sketch paths to compile (recursive) compatible with all boards
UNIVERSAL_SKETCH_PATHS: |
- libraries/Scheduler
SKETCHES_REPORTS_PATH: sketches-reports
strategy:
fail-fast: false
matrix:
board:
- fqbn: arduino:mbed:nano33ble
- fqbn: arduino:mbed:envie_m4
- fqbn: arduino:mbed:envie_m7
- fqbn: arduino:mbed:nanorp2040connect
- fqbn: arduino:mbed:nicla_sense
# compile only the examples compatible with each board
include:
- board:
fqbn: arduino:mbed:nano33ble
additional-sketch-paths: |
- libraries/PDM
- libraries/ThreadDebug
- libraries/USBHID
- libraries/USBMSD/examples/Nano33BLE_FlashMassStorage
- board:
fqbn: arduino:mbed:envie_m4
additional-libraries: |
- name: lvgl
additional-sketch-paths: |
- libraries/doom
- libraries/KernelDebug
- libraries/Portenta_SDCARD
- libraries/Portenta_SDRAM
- libraries/Portenta_Video
- libraries/RPC
- board:
fqbn: arduino:mbed:envie_m7
additional-libraries: |
- name: lvgl
version: 7.11.0
additional-sketch-paths: |
- libraries/PDM
- libraries/doom
- libraries/KernelDebug
- libraries/Portenta_Camera/examples
- libraries/Portenta_lvgl/examples/Portenta_lvgl
- libraries/Portenta_SDCARD
- libraries/Portenta_SDRAM
- libraries/Portenta_System
- libraries/Portenta_Video
- libraries/RPC
- libraries/ThreadDebug
- libraries/USBHID
- libraries/USBHOST
- libraries/USBMSD/examples/AccessFlashAsUSBDisk
- libraries/WiFi
- board:
fqbn: arduino:mbed:nanorp2040connect
additional-sketch-paths: |
- libraries/PDM
- libraries/USBHID
- ~/Arduino/libraries/WiFiNINA
- board:
fqbn: arduino:mbed:nicla_sense
additional-sketch-paths: |
- libraries/Nicla_System
- ~/Arduino/libraries/Arduino_BHY2
additional-libraries: |
- name: Arduino_BHY2
- name: ArduinoBLE
steps:
- name: Checkout repository
uses: actions/checkout@v2
# The source files are in a subfolder of the ArduinoCore-API repository, so it's not possible to clone it directly to the final destination in the core
- name: Checkout ArduinoCore-API
uses: actions/checkout@v2
with:
repository: arduino/ArduinoCore-API
path: ArduinoCore-API
- name: Install ArduinoCore-API
run: mv "$GITHUB_WORKSPACE/ArduinoCore-API/api" "$GITHUB_WORKSPACE/cores/arduino"
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
- name: WiFiNINA
${{ matrix.additional-libraries }}
platforms: |
# Use Board Manager to install the latest release of Arduino mbed Boards to get the toolchain
- name: "arduino:mbed"
# Overwrite the Board Manager installation with the local platform
- source-path: "./"
name: "arduino:mbed"
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
${{ matrix.additional-sketch-paths }}
verbose: 'false'
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Save memory usage change report as artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v2
with:
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: ${{ env.SKETCHES_REPORTS_PATH }}