1
0
mirror of https://github.com/arduino-libraries/ArduinoLowPower.git synced 2025-04-19 11:42:14 +03:00

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.
This commit is contained in:
per1234 2021-04-12 02:37:19 -07:00
parent 8c055a48f0
commit 0e89b28f57
2 changed files with 95 additions and 0 deletions

94
.github/workflows/compile-examples.yml vendored Normal file
View File

@ -0,0 +1,94 @@
name: Compile Examples
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
schedule:
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
- cron: "0 8 * * TUE"
workflow_dispatch:
repository_dispatch:
jobs:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest
fail-fast: false
matrix:
board:
- fqbn: arduino:samd:arduino_zero_edbg
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkr1000
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrzero
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrwifi1010
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrfox1200
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrwan1300
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrwan1310
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrgsm1400
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrnb1500
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:mkrvidor4000
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:nano_33_iot
platforms: |
- name: arduino:samd
- fqbn: arduino:samd:tian
platforms: |
- name: arduino:samd
sketch-paths: |
- examples/TianStandby
- fqbn: arduino:nrf52:primo
platforms: |
- name: arduino:nrf52
sketch-paths: |
- examples/PrimoDeepSleep
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
platforms: ${{ matrix.board.platforms }}
libraries: |
# Install the library from the local path.
- source-path: ./
- name: RTCZero
sketch-paths: |
# Sketches to compile for all boards
- examples/AdcWakeup
- examples/ExternalWakeup
- examples/TimedWakeup
# Board-specific sketches
${{ matrix.board.sketch-paths }}

View File

@ -1,6 +1,7 @@
# Arduino Low Power library # Arduino Low Power library
[![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) [![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)
[![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)
[![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) [![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)
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). 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).