Skip to content

Commit 05b7d7a

Browse files
committed
Add "smoke test" examples compilation CI workflow
On every push or pull request that affects platform source code or bundled libraries, compile example sketches of all bundled libraries for the platform's boards.
1 parent d990c93 commit 05b7d7a

File tree

2 files changed

+196
-0
lines changed

2 files changed

+196
-0
lines changed

Diff for: .github/workflows/compile-platform-examples.yml

+195
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
name: Compile Examples
2+
3+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-platform-examples.ya?ml"
8+
- "cores/**"
9+
- "libraries/**"
10+
- "variants/**"
11+
- "boards.txt"
12+
- "platform.txt"
13+
pull_request:
14+
paths:
15+
- ".github/workflows/compile-platform-examples.ya?ml"
16+
- "cores/**"
17+
- "libraries/**"
18+
- "variants/**"
19+
- "boards.txt"
20+
- "platform.txt"
21+
workflow_dispatch:
22+
repository_dispatch:
23+
24+
jobs:
25+
build:
26+
name: ${{ matrix.board.fqbn }}
27+
runs-on: ubuntu-latest
28+
29+
strategy:
30+
fail-fast: false
31+
32+
matrix:
33+
board:
34+
- fqbn: arduino:avr:yun
35+
serial: true
36+
softwareserial: true
37+
- fqbn: arduino:avr:uno
38+
serial: true
39+
softwareserial: true
40+
- fqbn: arduino:avr:diecimila:cpu=atmega328
41+
serial: true
42+
softwareserial: true
43+
- fqbn: arduino:avr:diecimila:cpu=atmega168
44+
serial: true
45+
softwareserial: true
46+
- fqbn: arduino:avr:nano:cpu=atmega328
47+
serial: true
48+
softwareserial: true
49+
- fqbn: arduino:avr:nano:cpu=atmega328old
50+
serial: true
51+
softwareserial: true
52+
- fqbn: arduino:avr:nano:cpu=atmega168
53+
serial: true
54+
softwareserial: true
55+
- fqbn: arduino:avr:mega:cpu=atmega2560
56+
serial: true
57+
softwareserial: true
58+
- fqbn: arduino:avr:mega:cpu=atmega1280
59+
serial: true
60+
softwareserial: true
61+
- fqbn: arduino:avr:megaADK
62+
serial: true
63+
softwareserial: true
64+
- fqbn: arduino:avr:leonardo
65+
serial: true
66+
softwareserial: true
67+
- fqbn: arduino:avr:leonardoeth
68+
serial: true
69+
softwareserial: true
70+
- fqbn: arduino:avr:micro
71+
serial: true
72+
softwareserial: true
73+
- fqbn: arduino:avr:esplora
74+
serial: true
75+
softwareserial: true
76+
- fqbn: arduino:avr:mini:cpu=atmega328
77+
serial: true
78+
softwareserial: true
79+
- fqbn: arduino:avr:mini:cpu=atmega168
80+
serial: true
81+
softwareserial: true
82+
- fqbn: arduino:avr:ethernet
83+
serial: true
84+
softwareserial: true
85+
- fqbn: arduino:avr:fio
86+
serial: true
87+
softwareserial: true
88+
- fqbn: arduino:avr:bt:cpu=atmega328
89+
serial: true
90+
softwareserial: true
91+
- fqbn: arduino:avr:bt:cpu=atmega168
92+
serial: true
93+
softwareserial: true
94+
- fqbn: arduino:avr:LilyPadUSB
95+
serial: true
96+
softwareserial: true
97+
- fqbn: arduino:avr:lilypad:cpu=atmega328
98+
serial: true
99+
softwareserial: true
100+
- fqbn: arduino:avr:lilypad:cpu=atmega168
101+
serial: true
102+
softwareserial: true
103+
- fqbn: arduino:avr:pro:cpu=16MHzatmega328
104+
serial: true
105+
softwareserial: true
106+
- fqbn: arduino:avr:pro:cpu=8MHzatmega328
107+
serial: true
108+
softwareserial: true
109+
- fqbn: arduino:avr:pro:cpu=16MHzatmega168
110+
serial: true
111+
softwareserial: true
112+
- fqbn: arduino:avr:pro:cpu=8MHzatmega168
113+
serial: true
114+
softwareserial: true
115+
- fqbn: arduino:avr:atmegang:cpu=atmega168
116+
serial: true
117+
softwareserial: true
118+
- fqbn: arduino:avr:atmegang:cpu=atmega8
119+
serial: true
120+
softwareserial: false
121+
- fqbn: arduino:avr:robotControl
122+
serial: true
123+
softwareserial: false
124+
- fqbn: arduino:avr:robotMotor
125+
serial: true
126+
softwareserial: false
127+
- fqbn: arduino:avr:gemma
128+
serial: false
129+
softwareserial: false
130+
- fqbn: arduino:avr:circuitplay32u4cat
131+
serial: true
132+
softwareserial: true
133+
- fqbn: arduino:avr:yunmini
134+
serial: true
135+
softwareserial: true
136+
- fqbn: arduino:avr:chiwawa
137+
serial: true
138+
softwareserial: true
139+
- fqbn: arduino:avr:one
140+
serial: true
141+
softwareserial: true
142+
- fqbn: arduino:avr:unowifi
143+
serial: true
144+
softwareserial: true
145+
146+
# Make board type-specific customizations to the matrix jobs
147+
include:
148+
- board:
149+
# Boards with Serial interface
150+
serial: true
151+
# Compile these sketches in addition to the ones compiled for all boards
152+
serial-sketch-paths: |
153+
- libraries/EEPROM/examples/eeprom_crc
154+
- libraries/EEPROM/examples/eeprom_get
155+
- libraries/EEPROM/examples/eeprom_put
156+
- libraries/EEPROM/examples/eeprom_read
157+
- libraries/SPI
158+
- libraries/Wire
159+
- board:
160+
serial: false
161+
serial-sketch-paths: ""
162+
- board:
163+
# Boards compatible with the SoftwareSerial library
164+
softwareserial: true
165+
softwareserial-sketch-paths: |
166+
- libraries/SoftwareSerial
167+
- board:
168+
softwareserial: false
169+
softwareserial-sketch-paths: ""
170+
171+
steps:
172+
- name: Checkout repository
173+
uses: actions/checkout@v2
174+
175+
- name: Compile examples
176+
uses: arduino/compile-sketches@v1
177+
with:
178+
github-token: ${{ secrets.GITHUB_TOKEN }}
179+
fqbn: ${{ matrix.board.fqbn }}
180+
platforms: |
181+
# Use Boards Manager to install the latest release of the platform to get the toolchain.
182+
- name: arduino:avr
183+
# Overwrite the Boards Manager installation with the platform from the repository.
184+
- source-path: ./
185+
name: arduino:avr
186+
sketch-paths: |
187+
- libraries
188+
# Compile these sketches for all boards
189+
- libraries/EEPROM/examples/eeprom_clear
190+
- libraries/EEPROM/examples/eeprom_iteration
191+
- libraries/EEPROM/examples/eeprom_update
192+
- libraries/EEPROM/examples/eeprom_write
193+
# Board-specific sketches
194+
${{ matrix.serial-sketch-paths }}
195+
${{ matrix.softwareserial-sketch-paths }}

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Arduino AVR Boards
22

33
[![Check Arduino status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/check-arduino.yml)
4+
[![Compile Examples status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/compile-platform-examples.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/compile-platform-examples.yml)
45
[![Spell Check status](https://github.com/arduino/ArduinoCore-avr/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/ArduinoCore-avr/actions/workflows/spell-check.yml)
56

67
This repository contains the source code and configuration files of the Arduino AVR Boards

0 commit comments

Comments
 (0)