Skip to content

Commit c55fcb3

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 e416654 commit c55fcb3

File tree

2 files changed

+64
-18
lines changed

2 files changed

+64
-18
lines changed

.github/workflows/compile-examples.yml

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

7-
strategy:
8-
matrix:
9-
fqbn: [
10-
"arduino:samd:mkrwifi1010"
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
57+
- name: Arduino_JSON
58+
- name: ArduinoBearSSL
59+
- name: ArduinoECCX08
60+
- name: ArduinoHttpClient
61+
- name: WiFiNINA
62+
sketch-paths: |
63+
- examples
1264
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 }}
20-
libraries: ArduinoECCX08 ArduinoBearSSL ArduinoHttpClient Arduino_JSON WiFiNINA

README.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
= Arduino_OAuth =
1+
:repository-owner: arduino-libraries
2+
:repository-name: Arduino_OAuth
23

3-
image:https://github.com/arduino-libraries/Arduino_OAuth/workflows/Compile%20Examples/badge.svg["Compile Examples Status", link="https://github.com/arduino-libraries/Arduino_OAuth/actions?workflow=Compile+Examples"] image:https://github.com/arduino-libraries/Arduino_OAuth/workflows/Spell%20Check/badge.svg["Spell Check Status", link="https://github.com/arduino-libraries/Arduino_OAuth/actions?workflow=Spell+Check"]
4+
= {repository-name} Library for Arduino =
45

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"]
57

68
OAuth 1.0 client library for Arduino.
79

0 commit comments

Comments
 (0)