-
Notifications
You must be signed in to change notification settings - Fork 129
149 lines (141 loc) · 5.19 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
139
140
141
142
143
144
145
146
147
148
149
name: Compile Examples
on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "library.properties"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "library.properties"
- "examples/**"
- "src/**"
schedule:
# run every Tuesday at 3 AM UTC to catch breakage caused by changes to external dependencies (libraries, platforms)
- cron: "0 3 * * 2"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
jobs:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest
env:
SKETCHES_REPORTS_PATH: sketches-reports
# Libraries to install for all boards
UNIVERSAL_LIBRARIES: |
# Install the ArduinoModbus library from the local path
- source-path: ./
- name: ArduinoRS485
- name: Arduino_10BASE_T1S
UNIVERSAL_SKETCH_PATHS: |
- examples/RTU
strategy:
fail-fast: false
matrix:
board:
- fqbn: arduino:megaavr:uno2018:mode=off
ethernet: true
nina: true
spe: false
artifact-name-suffix: arduino-megaavr-uno2018
- fqbn: arduino:samd:mkrwifi1010
ethernet: true
nina: true
spe: false
artifact-name-suffix: arduino-samd-mkrwifi1010
- fqbn: arduino:mbed_nano:nano33ble
ethernet: false
nina: false
spe: false
artifact-name-suffix: arduino-mbed_nano-nano33ble
- fqbn: arduino:mbed_portenta:envie_m7
ethernet: false
nina: false
spe: false
artifact-name-suffix: arduino-mbed_portenta-envie_m7
- fqbn: arduino:mbed_opta:opta
ethernet: true
nina: false
spe: false
artifact-name-suffix: arduino-mbed_opta-opta
- fqbn: arduino:renesas_uno:unor4wifi
ethernet: false
nina: false
spe: true
artifact-name-suffix: arduino-renesas_uno-unor4wifi
- fqbn: arduino:renesas_uno:minima
ethernet: false
nina: false
spe: true
artifact-name-suffix: arduino-renesas_uno-minima
# Make board type-specific customizations to the matrix jobs
include:
- board:
# Boards with Ethernet library support
ethernet: true
# Install these libraries in addition to the ones defined by env.UNIVERSAL_LIBRARIES
ethernet-libraries: |
- name: Ethernet
# Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS
ethernet-sketch-paths: |
- examples/TCP/EthernetModbusClientToggle
- examples/TCP/EthernetModbusServerLED
- board:
ethernet: false
ethernet-libraries: ""
ethernet-sketch-paths: ""
- board:
# Boards with NINA-W102 module
nina: true
# Install these libraries in addition to the ones defined by env.UNIVERSAL_LIBRARIES
nina-libraries: |
- name: WiFiNINA
# Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS
nina-sketch-paths: |
- examples/TCP/WiFiModbusClientToggle
- examples/TCP/WiFiModbusServerLED
- board:
nina: false
nina-libraries: ""
nina-sketch-paths: ""
- board:
# Boards with T1S shield
spe: true
# Install these libraries in addition to the ones defined by env.UNIVERSAL_LIBRARIES
spe-libraries: ""
# Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS
nina-sketch-paths: |
- examples/T1S
- board:
# Boards with T1S shield
spe: false
# Install these libraries in addition to the ones defined by env.UNIVERSAL_LIBRARIES
spe-libraries: ""
# Compile these sketches in addition to the ones defined by env.UNIVERSAL_SKETCH_PATHS
nina-sketch-paths: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
${{ env.UNIVERSAL_LIBRARIES }}
${{ matrix.ethernet-libraries }}
${{ matrix.nina-libraries }}
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
${{ matrix.ethernet-sketch-paths }}
${{ matrix.nina-sketch-paths }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
path: ${{ env.SKETCHES_REPORTS_PATH }}