-
Notifications
You must be signed in to change notification settings - Fork 37
127 lines (116 loc) · 4.94 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
name: Compile Examples
on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
jobs:
build:
runs-on: ubuntu-latest
env:
LIBRARIES: Arduino_DebugUtils WiFi101 WiFiNINA MKRGSM MKRNB MKRWAN
ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed
ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API
SKETCHES_REPORTS_PATH: sketches-reports
strategy:
matrix:
board:
- fqbn: "arduino:samd:mkr1000"
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrwifi1010"
platform-name: arduino:samd
- fqbn: "arduino:samd:nano_33_iot"
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrgsm1400"
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrnb1500"
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrwan1300"
platform-name: arduino:samd
- fqbn: "arduino:samd:mkrwan1310"
platform-name: arduino:samd
- fqbn: "arduino:mbed:envie_m7"
platform-name: arduino:mbed
- fqbn: "arduino:mbed:envie_m4"
platform-name: arduino:mbed
- fqbn: "esp8266:esp8266:huzzah"
platform-name: esp8266:esp8266
- fqbn: "esp32:esp32:esp32"
platform-name: esp32:esp32
# Make board type-specific customizations to the matrix jobs
include:
- board:
platform-name: arduino:samd
platforms: |
# Install Arduino SAMD Boards via Boards Manager
- name: arduino:samd
- board:
platform-name: arduino:mbed
platforms: |
# Install Arduino mbed-Enabled Boards via Boards Manager for the toolchain
- name: arduino:mbed
# Overwrite the Arduino mbed-Enabled Boards release version with version from the tip of the default branch (located in local path because of the need to first install ArduinoCore-API)
- source-path: extras/ArduinoCore-mbed
name: arduino:mbed
- board:
platform-name: esp8266:esp8266
platforms: |
# Install ESP8266 platform via Boards Manager
- name: esp8266:esp8266
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
version: 2.5.0
- board:
platform-name: esp32:esp32
platforms: |
# Install ESP32 platform via Boards Manager
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
# It's necessary to checkout the platform before installing it so that the ArduinoCore-API dependency can be added
- name: Checkout ArduinoCore-mbed
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
if: matrix.board.platform-name == 'arduino:mbed'
uses: actions/checkout@v2
with:
repository: arduino/ArduinoCore-mbed
# The arduino/actions/libraries/compile-examples action will install the platform from this path
path: ${{ env.ARDUINOCORE_MBED_STAGING_PATH }}
- name: Checkout ArduinoCore-API
# This step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
if: matrix.board.platform-name == 'arduino:mbed'
uses: actions/checkout@v2
with:
repository: arduino/ArduinoCore-API
path: ${{ env.ARDUINOCORE_API_STAGING_PATH }}
- name: Install ArduinoCore-API
# This step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
if: matrix.board.platform-name == 'arduino:mbed'
run: |
mv "${{ env.ARDUINOCORE_API_STAGING_PATH }}/api" "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino"
- name: Install ESP32 platform dependencies
if: matrix.board.platform-name == 'esp32:esp32'
run: pip3 install pyserial
- name: Compile examples
uses: arduino/compile-sketches@main
with:
platforms: ${{ matrix.platforms }}
fqbn: ${{ matrix.board.fqbn }}
libraries: ${{ env.LIBRARIES }}
size-report-sketch: 'ConnectionHandlerDemo'
enable-size-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@v1
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
path: ${{ env.SKETCHES_REPORTS_PATH }}