-
Notifications
You must be signed in to change notification settings - Fork 80
69 lines (61 loc) · 2.76 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
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 to install
UNIVERSAL_LIBRARIES: '"ArduinoCloudThing" "Arduino_ConnectionHandler" "Arduino_DebugUtils" "ArduinoMqttClient"'
# board-specific libraries
WIFI_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "WiFi101" "WiFiNINA"'
WAN_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRWAN"'
GSM_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRGSM"'
NB_LIBRARIES: '"ArduinoBearSSL" "ArduinoECCX08" "RTCZero" "MKRNB"'
ESP8266_LIBRARIES: ''
# sketch paths to compile (recursive)
UNIVERSAL_SKETCH_PATHS: '"examples/ArduinoIoTCloud-Advanced" "examples/ArduinoIoTCloud-Basic" "examples/utility/ArduinoIoTCloud_Travis_CI"'
# board-specific sketches
WIFI_SKETCH_PATHS: '"examples/utility/Provisioning" "examples/utility/WiFi_Cloud_Blink"'
WAN_SKETCH_PATHS: ''
GSM_SKETCH_PATHS: '"examples/utility/Provisioning" "examples/utility/GSM_Cloud_Blink"'
NB_SKETCH_PATHS: '"examples/utility/Provisioning" "examples/utility/NB_Cloud_Blink"'
ESP8266_SKETCH_PATHS: '"examples/utility/WiFi_Cloud_Blink_with_security_credentials"'
strategy:
fail-fast: false
matrix:
board: [
{"fqbn": "arduino:samd:mkr1000", "type": "WIFI"},
{"fqbn": "arduino:samd:mkrwifi1010", "type": "WIFI"},
{"fqbn": "arduino:samd:nano_33_iot", "type": "WIFI"},
{"fqbn": "arduino:samd:mkrwan1300", "type": "WAN"},
{"fqbn": "arduino:samd:mkrgsm1400", "type": "GSM"},
{"fqbn": "arduino:samd:mkrnb1500", "type": "NB"},
{"fqbn": '"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"', "type": "ESP8266"}
]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile examples
uses: arduino/actions/libraries/compile-examples@master
with:
fqbn: ${{ matrix.board.fqbn }}
libraries: "${{ env.UNIVERSAL_LIBRARIES }} ${{ env[format('{0}{1}', matrix.board.type, '_LIBRARIES')] }}"
sketch-paths: "${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ env[format('{0}{1}', matrix.board.type, '_SKETCH_PATHS')] }}"
size-report-sketch: 'ArduinoIoTCloud_Travis_CI'
enable-size-deltas-report: 'true'
- name: Save memory usage change report as artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v1
with:
name: 'size-deltas-reports'
path: 'size-deltas-reports'