Skip to content

Commit 66adc09

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 498b6bc commit 66adc09

File tree

2 files changed

+116
-0
lines changed

2 files changed

+116
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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+
- "examples/**"
9+
- "src/**"
10+
pull_request:
11+
paths:
12+
- ".github/workflows/compile-examples.yml"
13+
- "examples/**"
14+
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
20+
21+
jobs:
22+
build:
23+
name: ${{ matrix.board.fqbn }}
24+
runs-on: ubuntu-latest
25+
26+
strategy:
27+
fail-fast: false
28+
29+
matrix:
30+
board:
31+
- fqbn: arduino:samd:nano_33_iot
32+
platforms: |
33+
- name: arduino:samd
34+
type: nano
35+
- fqbn: arduino:samd:mkr1000
36+
platforms: |
37+
- name: arduino:samd
38+
type: mkr
39+
- fqbn: arduino:samd:mkrzero
40+
platforms: |
41+
- name: arduino:samd
42+
type: mkr
43+
- fqbn: arduino:samd:mkrwifi1010
44+
platforms: |
45+
- name: arduino:samd
46+
type: mkr
47+
- fqbn: arduino:samd:mkrfox1200
48+
platforms: |
49+
- name: arduino:samd
50+
type: mkr
51+
- fqbn: arduino:samd:mkrwan1300
52+
platforms: |
53+
- name: arduino:samd
54+
type: mkr
55+
- fqbn: arduino:samd:mkrwan1310
56+
platforms: |
57+
- name: arduino:samd
58+
type: mkr
59+
- fqbn: arduino:samd:mkrgsm1400
60+
platforms: |
61+
- name: arduino:samd
62+
type: mkr
63+
- fqbn: arduino:samd:mkrnb1500
64+
platforms: |
65+
- name: arduino:samd
66+
type: mkr
67+
- fqbn: arduino:samd:mkrvidor4000
68+
platforms: |
69+
- name: arduino:samd
70+
type: mkr
71+
- fqbn: arduino:mbed_portenta:envie_m4
72+
platforms: |
73+
- name: arduino:mbed_portenta
74+
type: mkr
75+
- fqbn: arduino:mbed_portenta:envie_m7
76+
platforms: |
77+
- name: arduino:mbed_portenta
78+
type: mkr
79+
80+
# make board type-specific customizations to the matrix jobs
81+
include:
82+
- board:
83+
type: nano
84+
libraries: |
85+
- name: BNO055
86+
- name: Arduino_BQ24195
87+
sketch-paths: |
88+
- examples/Nano
89+
- board:
90+
type: mkr
91+
libraries: |
92+
-
93+
sketch-paths: |
94+
- examples/Motor_test
95+
- examples/Motor_test_encoder
96+
- examples/Servo_test
97+
98+
steps:
99+
- name: Checkout repository
100+
uses: actions/checkout@v2
101+
102+
- name: Compile examples
103+
uses: arduino/compile-sketches@v1
104+
with:
105+
github-token: ${{ secrets.GITHUB_TOKEN }}
106+
fqbn: ${{ matrix.board.fqbn }}
107+
platforms: ${{ matrix.board.platforms }}
108+
libraries: |
109+
# Install the library from the local path.
110+
- source-path: ./
111+
${{ matrix.libraries }}
112+
sketch-paths: |
113+
- examples/Flasher
114+
- examples/Test
115+
${{ matrix.sketch-paths }}

README.md

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

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

67
This library is designed to use the MKR Motor Carrier. The shield supports micro servo motors, DC motors and DC motors with encoder. This library, therefore, has functions and creates objects to support such hardware. Objects are automatically created when "ArduinoMotorCarrier.h" is included, hence no need to initiate objects manually.

0 commit comments

Comments
 (0)