Skip to content

Commit 8362a5a

Browse files
committed
Update "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 ae6da13 commit 8362a5a

File tree

2 files changed

+70
-23
lines changed

2 files changed

+70
-23
lines changed

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

+69-23
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,73 @@
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+
- "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+
321
jobs:
4-
build:
5-
runs-on: ubuntu-latest
6-
env:
7-
LIBRARIES: WiFi101 WiFiNINA
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:megaavr:uno2018
32+
platforms: |
33+
- name: arduino:megaavr
34+
libraries: |
35+
- name: WiFiNINA
36+
- fqbn: arduino:samd:mkrwifi1010
37+
platforms: |
38+
- name: arduino:samd
39+
libraries: |
40+
- name: WiFiNINA
41+
- fqbn: arduino:samd:mkr1000
42+
platforms: |
43+
- name: arduino:samd
44+
libraries: |
45+
- name: WiFi101
46+
- fqbn: arduino:samd:nano_33_iot
47+
platforms: |
48+
- name: arduino:samd
49+
libraries: |
50+
- name: WiFiNINA
51+
- fqbn: esp8266:esp8266:huzzah
52+
platforms: |
53+
- name: esp8266:esp8266
54+
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
55+
libraries: ""
56+
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v2
860

9-
strategy:
10-
matrix:
11-
fqbn: [
12-
"arduino:samd:mkr1000",
13-
"arduino:samd:mkrwifi1010",
14-
"arduino:samd:nano_33_iot",
15-
"arduino:megaavr:uno2018",
16-
'"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"'
17-
]
61+
- name: Compile examples
62+
uses: arduino/compile-sketches@v1
63+
with:
64+
github-token: ${{ secrets.GITHUB_TOKEN }}
65+
fqbn: ${{ matrix.board.fqbn }}
66+
platforms: ${{ matrix.board.platforms }}
67+
libraries: |
68+
# Install the library from the local path.
69+
- source-path: ./
70+
${{ matrix.board.libraries }}
71+
sketch-paths: |
72+
- examples
1873
19-
steps:
20-
- uses: actions/checkout@v1
21-
with:
22-
fetch-depth: 1
23-
- name: compile-examples for official Arduino boards
24-
uses: arduino/actions/libraries/compile-examples@master
25-
with:
26-
fqbn: ${{ matrix.fqbn }}
27-
libraries: ${{ env.LIBRARIES }}

Diff for: README.adoc

+1
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
Allows you to send and receive MQTT messages using Arduino.

0 commit comments

Comments
 (0)