Skip to content

Commit 9a257e9

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 419e331 commit 9a257e9

File tree

2 files changed

+119
-0
lines changed

2 files changed

+119
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Compile Examples
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+
- "examples/**"
9+
- "src/**"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "examples/**"
14+
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
jobs:
22+
build:
23+
name: ${{ matrix.board.fqbn }}
24+
runs-on: ubuntu-latest
25+
26+
strategy:
27+
fail-fast: false
28+
29+
matrix:
30+
board:
31+
- fqbn: arduino:avr:nano
32+
platforms: |
33+
- name: arduino:avr
34+
type: ethernet
35+
- fqbn: arduino:avr:mega
36+
platforms: |
37+
- name: arduino:avr
38+
type: ethernet
39+
- fqbn: arduino:avr:leonardo
40+
platforms: |
41+
- name: arduino:avr
42+
type: ethernet
43+
- fqbn: arduino:megaavr:uno2018
44+
platforms: |
45+
- name: arduino:megaavr
46+
type: ethernet
47+
- fqbn: arduino:megaavr:nona4809
48+
platforms: |
49+
- name: arduino:megaavr
50+
type: ethernet
51+
- fqbn: arduino:sam:arduino_due_x_dbg
52+
platforms: |
53+
- name: arduino:sam
54+
type: ethernet
55+
- fqbn: arduino:samd:arduino_zero_edbg
56+
platforms: |
57+
- name: arduino:samd
58+
type: ethernet
59+
- fqbn: arduino:samd:mkrzero
60+
platforms: |
61+
- name: arduino:samd
62+
type: ethernet
63+
- fqbn: arduino:samd:nano_33_iot
64+
platforms: |
65+
- name: arduino:samd
66+
type: ethernet
67+
- fqbn: arduino:mbed_portenta:envie_m4
68+
platforms: |
69+
- name: arduino:mbed_portenta
70+
type: ethernet
71+
- fqbn: arduino:mbed_portenta:envie_m7
72+
platforms: |
73+
- name: arduino:mbed_portenta
74+
type: ethernet
75+
- fqbn: arduino:mbed_nano:nano33ble
76+
platforms: |
77+
- name: arduino:mbed_nano
78+
type: ethernet
79+
- fqbn: arduino:mbed_nano:nanorp2040connect
80+
platforms: |
81+
- name: arduino:mbed_nano
82+
type: ethernet
83+
- fqbn: arduino:samd:mkr1000
84+
platforms: |
85+
- name: arduino:samd
86+
type: wifi101
87+
88+
# make board type-specific customizations to the matrix jobs
89+
include:
90+
- board:
91+
type: ethernet
92+
libraries: |
93+
- name: Ethernet
94+
sketch-paths: |
95+
- examples/Ethernet
96+
- board:
97+
type: wifi101
98+
libraries: |
99+
- name: WiFi101
100+
sketch-paths: |
101+
- examples/WiFi
102+
103+
steps:
104+
- name: Checkout repository
105+
uses: actions/checkout@v2
106+
107+
- name: Compile examples
108+
uses: arduino/compile-sketches@v1
109+
with:
110+
github-token: ${{ secrets.GITHUB_TOKEN }}
111+
fqbn: ${{ matrix.board.fqbn }}
112+
platforms: ${{ matrix.board.platforms }}
113+
libraries: |
114+
# Install the library from the local path.
115+
- source-path: ./
116+
${{ matrix.libraries }}
117+
sketch-paths: |
118+
${{ matrix.sketch-paths }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ArduinoMDNS
22

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

67
mDNS library for Arduino. Based on [@TrippyLighting](https://github.com/TrippyLighting)'s [EthernetBonjour](https://github.com/TrippyLighting/EthernetBonjour) library.

0 commit comments

Comments
 (0)