Skip to content

Commit 2c1a336

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 3b5dc25 commit 2c1a336

File tree

2 files changed

+61
-17
lines changed

2 files changed

+61
-17
lines changed

.github/workflows/compile-examples.yml

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,60 @@
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:samd:arduino_zero_edbg
34+
platforms: |
35+
- name: arduino:samd
36+
- fqbn: arduino:samd:mkrzero
37+
platforms: |
38+
- name: arduino:samd
39+
- fqbn: arduino:samd:nano_33_iot
40+
platforms: |
41+
- name: arduino:samd
42+
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v2
646

7-
strategy:
8-
matrix:
9-
fqbn: [
10-
"arduino:samd:mkrzero"
11-
]
47+
- name: Compile examples
48+
uses: arduino/compile-sketches@v1
49+
with:
50+
github-token: ${{ secrets.GITHUB_TOKEN }}
51+
fqbn: ${{ matrix.board.fqbn }}
52+
platforms: ${{ matrix.board.platforms }}
53+
libraries: |
54+
# Install the library from the local path.
55+
- source-path: ./
56+
# Additional library dependencies can be listed here.
57+
# See: https://github.com/arduino/compile-sketches#libraries
58+
sketch-paths: |
59+
- examples
1260
13-
steps:
14-
- uses: actions/checkout@v1
15-
with:
16-
fetch-depth: 1
17-
- uses: arduino/actions/libraries/compile-examples@master
18-
with:
19-
fqbn: ${{ matrix.fqbn }}

README.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
= ArduinoGraphics Library for Arduino =
1+
:repository-owner: arduino-libraries
2+
:repository-name: ArduinoGraphics
23

3-
image:https://github.com/arduino-libraries/ArduinoGraphics/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/arduino-libraries/ArduinoGraphics/actions?workflow=Compile+Examples"] image:https://github.com/arduino-libraries/ArduinoGraphics/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/arduino-libraries/ArduinoGraphics/actions?workflow=Spell+Check"]
4+
= {repository-name} Library for Arduino =
5+
6+
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"]
47

58
Core graphics library for Arduino. Based on the Processing API.
69

0 commit comments

Comments
 (0)