Skip to content

Commit 87a6333

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 43f62b8 commit 87a6333

File tree

2 files changed

+96
-0
lines changed

2 files changed

+96
-0
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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+
- "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+
23+
jobs:
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:nano_33_iot
61+
platforms: |
62+
- name: arduino:samd
63+
- fqbn: arduino:mbed_portenta:envie_m4
64+
platforms: |
65+
- name: arduino:mbed_portenta
66+
- fqbn: arduino:mbed_portenta:envie_m7
67+
platforms: |
68+
- name: arduino:mbed_portenta
69+
- fqbn: arduino:mbed_edge:edge_control
70+
platforms: |
71+
- name: arduino:mbed_edge
72+
- fqbn: arduino:mbed_nano:nano33ble
73+
platforms: |
74+
- name: arduino:mbed_nano
75+
- fqbn: arduino:mbed_nano:nanorp2040connect
76+
platforms: |
77+
- name: arduino:mbed_nano
78+
79+
steps:
80+
- name: Checkout repository
81+
uses: actions/checkout@v2
82+
83+
- name: Compile examples
84+
uses: arduino/compile-sketches@v1
85+
with:
86+
github-token: ${{ secrets.GITHUB_TOKEN }}
87+
fqbn: ${{ matrix.board.fqbn }}
88+
platforms: ${{ matrix.board.platforms }}
89+
libraries: |
90+
# Install the library from the local path.
91+
- source-path: ./
92+
# Additional library dependencies can be listed here.
93+
# See: https://github.com/arduino/compile-sketches#libraries
94+
sketch-paths: |
95+
- examples

README.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
= {repository-name} Library for Arduino =
55

66
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml/badge.svg["Check Arduino status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml"]
7+
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"]
78
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml"]
89

910
Process JSON in your Arduino sketches.

0 commit comments

Comments
 (0)