Skip to content

Commit e5b22ad

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 c8159b1 commit e5b22ad

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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:mbed_nano:nano33ble
34+
platforms: |
35+
- name: arduino:mbed_nano
36+
libraries: |
37+
- name: Arduino_APDS9960
38+
- name: Arduino_HTS221
39+
- name: Arduino_LPS22HB
40+
- name: Arduino_LSM9DS1
41+
sketch-paths: examples/Nano33BLESenseFirmware
42+
- fqbn: arduino:samd:mkrwifi1010
43+
platforms: |
44+
- name: arduino:samd
45+
libraries: |
46+
- name: ArduinoBLE
47+
- name: Adafruit LSM9DS1 Library
48+
sketch-paths: examples/PhysicsLabFirmware
49+
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v2
53+
54+
- name: Compile examples
55+
uses: arduino/compile-sketches@v1
56+
with:
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
fqbn: ${{ matrix.board.fqbn }}
59+
platforms: ${{ matrix.board.platforms }}
60+
libraries: |
61+
# Install the library from the local path.
62+
- source-path: ./
63+
# Board-specific library dependencies
64+
${{ matrix.board.libraries }}
65+
sketch-paths: |
66+
${{ matrix.board.sketch-paths }}

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
Firmware for the Physics Lab kit and the Arduino Nano 33 BLE Sense.

0 commit comments

Comments
 (0)