Skip to content

Commit 0e89b28

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 8c055a4 commit 0e89b28

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed
+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
fail-fast: false
27+
28+
matrix:
29+
board:
30+
- fqbn: arduino:samd:arduino_zero_edbg
31+
platforms: |
32+
- name: arduino:samd
33+
- fqbn: arduino:samd:mkr1000
34+
platforms: |
35+
- name: arduino:samd
36+
- fqbn: arduino:samd:mkrzero
37+
platforms: |
38+
- name: arduino:samd
39+
- fqbn: arduino:samd:mkrwifi1010
40+
platforms: |
41+
- name: arduino:samd
42+
- fqbn: arduino:samd:mkrfox1200
43+
platforms: |
44+
- name: arduino:samd
45+
- fqbn: arduino:samd:mkrwan1300
46+
platforms: |
47+
- name: arduino:samd
48+
- fqbn: arduino:samd:mkrwan1310
49+
platforms: |
50+
- name: arduino:samd
51+
- fqbn: arduino:samd:mkrgsm1400
52+
platforms: |
53+
- name: arduino:samd
54+
- fqbn: arduino:samd:mkrnb1500
55+
platforms: |
56+
- name: arduino:samd
57+
- fqbn: arduino:samd:mkrvidor4000
58+
platforms: |
59+
- name: arduino:samd
60+
- fqbn: arduino:samd:nano_33_iot
61+
platforms: |
62+
- name: arduino:samd
63+
- fqbn: arduino:samd:tian
64+
platforms: |
65+
- name: arduino:samd
66+
sketch-paths: |
67+
- examples/TianStandby
68+
- fqbn: arduino:nrf52:primo
69+
platforms: |
70+
- name: arduino:nrf52
71+
sketch-paths: |
72+
- examples/PrimoDeepSleep
73+
74+
steps:
75+
- name: Checkout repository
76+
uses: actions/checkout@v2
77+
78+
- name: Compile examples
79+
uses: arduino/compile-sketches@v1
80+
with:
81+
github-token: ${{ secrets.GITHUB_TOKEN }}
82+
fqbn: ${{ matrix.board.fqbn }}
83+
platforms: ${{ matrix.board.platforms }}
84+
libraries: |
85+
# Install the library from the local path.
86+
- source-path: ./
87+
- name: RTCZero
88+
sketch-paths: |
89+
# Sketches to compile for all boards
90+
- examples/AdcWakeup
91+
- examples/ExternalWakeup
92+
- examples/TimedWakeup
93+
# Board-specific sketches
94+
${{ matrix.board.sketch-paths }}

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Arduino Low Power library
22

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

67
This library allows the use of the low power features of the SAMD21 MCU. This means your battery powered projects will have a longer battery life on boards like [MKRZero](https://store.arduino.cc/usa/arduino-mkrzero), [MKR1000](https://www.arduino.cc/en/Main/ArduinoMKR1000) and [MKRFox1200](https://www.arduino.cc/en/Main/ArduinoBoardMKRFox1200).

0 commit comments

Comments
 (0)