Skip to content

Commit 7f8c57b

Browse files
committed
Add "smoke test" examples compilation CI workflow
On every push or pull request that affects library source or example files, and periodically, compile all example sketches for the specified boards.
1 parent a46198b commit 7f8c57b

File tree

2 files changed

+115
-19
lines changed

2 files changed

+115
-19
lines changed

.github/workflows/compile-examples.yml

Lines changed: 110 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,114 @@
11
name: Compile Examples
2-
on: [push, pull_request]
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-examples.yml"
8+
- "library.properties"
9+
- "examples/**"
10+
- "src/**"
11+
pull_request:
12+
paths:
13+
- ".github/workflows/compile-examples.yml"
14+
- "library.properties"
15+
- "examples/**"
16+
- "src/**"
17+
schedule:
18+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
19+
- cron: "0 8 * * TUE"
20+
workflow_dispatch:
21+
repository_dispatch:
22+
323
jobs:
4-
build:
5-
runs-on: ubuntu-latest
24+
build:
25+
name: ${{ matrix.board.fqbn }}
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
31+
matrix:
32+
board:
33+
- fqbn: arduino:avr:nano
34+
platforms: |
35+
- name: arduino:avr
36+
- fqbn: arduino:avr:mega
37+
platforms: |
38+
- name: arduino:avr
39+
- fqbn: arduino:avr:leonardo
40+
platforms: |
41+
- name: arduino:avr
42+
- fqbn: arduino:avr:yun
43+
platforms: |
44+
- name: arduino:avr
45+
- fqbn: arduino:megaavr:uno2018
46+
platforms: |
47+
- name: arduino:megaavr
48+
- fqbn: arduino:megaavr:nona4809
49+
platforms: |
50+
- name: arduino:megaavr
51+
- fqbn: arduino:sam:arduino_due_x_dbg
52+
platforms: |
53+
- name: arduino:sam
54+
- fqbn: arduino:samd:arduino_zero_edbg
55+
platforms: |
56+
- name: arduino:samd
57+
- fqbn: arduino:samd:mkrzero
58+
platforms: |
59+
- name: arduino:samd
60+
- fqbn: arduino:samd:mkr1000
61+
platforms: |
62+
- name: arduino:samd
63+
- fqbn: arduino:samd:mkrwifi1010
64+
platforms: |
65+
- name: arduino:samd
66+
- fqbn: arduino:samd:mkrfox1200
67+
platforms: |
68+
- name: arduino:samd
69+
- fqbn: arduino:samd:mkrwan1300
70+
platforms: |
71+
- name: arduino:samd
72+
- fqbn: arduino:samd:mkrwan1310
73+
platforms: |
74+
- name: arduino:samd
75+
- fqbn: arduino:samd:mkrgsm1400
76+
platforms: |
77+
- name: arduino:samd
78+
- fqbn: arduino:samd:mkrnb1500
79+
platforms: |
80+
- name: arduino:samd
81+
- fqbn: arduino:samd:mkrvidor4000
82+
platforms: |
83+
- name: arduino:samd
84+
- fqbn: arduino:samd:nano_33_iot
85+
platforms: |
86+
- name: arduino:samd
87+
- fqbn: arduino:mbed_portenta:envie_m7
88+
platforms: |
89+
- name: arduino:mbed_portenta
90+
- fqbn: arduino:mbed_nano:nano33ble
91+
platforms: |
92+
- name: arduino:mbed_nano
93+
- fqbn: arduino:mbed_nano:nanorp2040connect
94+
platforms: |
95+
- name: arduino:mbed_nano
96+
97+
steps:
98+
- name: Checkout repository
99+
uses: actions/checkout@v2
6100

7-
strategy:
8-
matrix:
9-
fqbn: [
10-
"arduino:avr:uno",
11-
"arduino:samd:mkrzero"
12-
]
101+
- name: Compile examples
102+
uses: arduino/compile-sketches@v1
103+
with:
104+
github-token: ${{ secrets.GITHUB_TOKEN }}
105+
fqbn: ${{ matrix.board.fqbn }}
106+
platforms: ${{ matrix.board.platforms }}
107+
libraries: |
108+
# Install the library from the local path.
109+
- source-path: ./
110+
# Additional library dependencies
111+
- name: ArduinoRS485
112+
sketch-paths: |
113+
- examples
13114
14-
steps:
15-
- uses: actions/checkout@v1
16-
with:
17-
fetch-depth: 1
18-
- uses: arduino/actions/libraries/compile-examples@master
19-
with:
20-
fqbn: ${{ matrix.fqbn }}
21-
libraries: ArduinoRS485

README.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
= DMX Library for Arduino =
1+
:repository-owner: arduino-libraries
2+
:repository-name: ArduinoDMX
23

3-
image:https://github.com/arduino-libraries/ArduinoDMX/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/arduino-libraries/ArduinoDMX/actions?workflow=Compile+Examples"] image:https://github.com/arduino-libraries/ArduinoDMX/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/arduino-libraries/ArduinoDMX/actions?workflow=Spell+Check"]
4+
= {repository-name} Library for Arduino =
5+
6+
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml/badge.svg["Compile Examples status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/compile-examples.yml"]
47

58
Control DMX lights with your Arduino.
69

0 commit comments

Comments
 (0)