Skip to content

Commit 1a75289

Browse files
committed
Add "smoke test" examples compilation CI workflow
On every push or pull request that affects library source or example files, compile all example sketches for the specified boards.
1 parent 59a8913 commit 1a75289

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Compile Examples
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- ".github/workflows/compile-examples.yml"
7+
- "examples/**"
8+
- "src/**"
9+
push:
10+
paths:
11+
- ".github/workflows/compile-examples.yml"
12+
- "examples/**"
13+
- "src/**"
14+
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
15+
schedule:
16+
# run every Saturday at 3 AM UTC
17+
- cron: "0 3 * * 6"
18+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
19+
workflow_dispatch:
20+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
21+
repository_dispatch:
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
27+
strategy:
28+
fail-fast: false
29+
30+
matrix:
31+
board:
32+
- fqbn: arduino:mbed:envie_m7
33+
platforms: |
34+
- name: arduino:mbed
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v2
39+
40+
- name: Compile examples
41+
uses: arduino/compile-sketches@main
42+
with:
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
fqbn: ${{ matrix.board.fqbn }}
45+
platforms: ${{ matrix.board.platforms }}
46+
libraries: |
47+
# Install the library from the local path.
48+
- source-path: ./
49+
# Additional library dependencies can be listed here.
50+
# See: https://github.com/arduino/compile-sketches#libraries
51+
sketch-paths: |
52+
- ./examples/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Arduino_Portenta_OTA
22

3+
[![Compile Examples](https://github.com/arduino-libraries/Arduino_Portenta_OTA/workflows/Compile%20Examples/badge.svg)](https://github.com/arduino-libraries/Arduino_Portenta_OTA/actions?workflow=Compile+Examples)
34
[![Spell Check](https://github.com/arduino-libraries/Arduino_Portenta_OTA/workflows/Spell%20Check/badge.svg)](https://github.com/arduino-libraries/Arduino_Portenta_OTA/actions?workflow=Spell+Check)
45

56
OTA on the Arduino Portenta.

0 commit comments

Comments
 (0)