Skip to content

Commit f6c17ff

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 d554397 commit f6c17ff

File tree

2 files changed

+51
-17
lines changed

2 files changed

+51
-17
lines changed

.github/workflows/compile-examples.yml

Lines changed: 50 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,54 @@
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:mbed_nano:nano33ble
34+
platforms: |
35+
- name: arduino:mbed_nano
36+
37+
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v2
640

7-
strategy:
8-
matrix:
9-
fqbn: [
10-
"arduino:mbed:nano33ble",
11-
"arduino:samd:mkrzero"
12-
]
41+
- name: Compile examples
42+
uses: arduino/compile-sketches@v1
43+
with:
44+
github-token: ${{ secrets.GITHUB_TOKEN }}
45+
fqbn: ${{ matrix.board.fqbn }}
46+
platforms: ${{ matrix.board.platforms }}
47+
libraries: |
48+
# Install the library from the local path.
49+
- source-path: ./
50+
# Additional library dependencies can be listed here.
51+
# See: https://github.com/arduino/compile-sketches#libraries
52+
sketch-paths: |
53+
- examples
1354
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: 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
Allows you to read the pressure sensor of your Nano 33 BLE Sense.

0 commit comments

Comments
 (0)