Skip to content

Commit 916d890

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 368e748 commit 916d890

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Compile Examples
2+
3+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/compile-examples.ya?ml"
8+
- "library.properties"
9+
- "examples/**"
10+
- "src/**"
11+
pull_request:
12+
paths:
13+
- ".github/workflows/compile-examples.ya?ml"
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+
permissions:
24+
contents: read
25+
26+
jobs:
27+
build:
28+
name: ${{ matrix.board.fqbn }}
29+
runs-on: ubuntu-latest
30+
31+
strategy:
32+
fail-fast: false
33+
34+
matrix:
35+
board:
36+
- fqbn: arduino:mbed_nicla:nicla_vision
37+
# See: https://github.com/arduino/compile-sketches#platforms
38+
platforms: |
39+
- name: arduino:mbed_nicla
40+
- fqbn: arduino:mbed_portenta:envie_m4
41+
platforms: |
42+
- name: arduino:mbed_portenta
43+
- fqbn: arduino:mbed_portenta:envie_m7
44+
platforms: |
45+
- name: arduino:mbed_portenta
46+
47+
steps:
48+
- name: Checkout repository
49+
uses: actions/checkout@v3
50+
51+
- name: Compile examples
52+
uses: arduino/compile-sketches@v1
53+
with:
54+
github-token: ${{ secrets.GITHUB_TOKEN }}
55+
fqbn: ${{ matrix.board.fqbn }}
56+
platforms: ${{ matrix.board.platforms }}
57+
libraries: |
58+
# Install the library from the local path.
59+
- source-path: ./
60+
# Additional library dependencies can be listed here.
61+
# See: https://github.com/arduino/compile-sketches#libraries
62+
sketch-paths: |
63+
- examples

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Arduino_PF1550
22

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

0 commit comments

Comments
 (0)