Skip to content

Commit

Permalink
Add "smoke test" examples compilation CI workflow
Browse files Browse the repository at this point in the history
On every push or pull request that affects library source or example files, and periodically, compile all example
sketches for the specified boards.
  • Loading branch information
per1234 committed Apr 11, 2021
1 parent e390b9d commit 7b8c9ea
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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

strategy:
fail-fast: false

matrix:
board:
- fqbn: arduino:avr:nano
platforms: |
- name: arduino:avr
- fqbn: arduino:avr:mega
platforms: |
- name: arduino:avr
- fqbn: arduino:avr:leonardo
platforms: |
- name: arduino:avr
- fqbn: arduino:megaavr:nona4809
platforms: |
- name: arduino:megaavr
- fqbn: arduino:sam:arduino_due_x_dbg
platforms: |
- name: arduino:sam
- fqbn: arduino:samd:mkrzero
platforms: |
- name: arduino:samd
- fqbn: arduino:mbed_portenta:envie_m4
platforms: |
- name: arduino:mbed_portenta
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
- fqbn: arduino:mbed_nano:nano33ble
platforms: |
- name: arduino:mbed_nano
- fqbn: arduino:mbed_nano:nanorp2040connect
platforms: |
- name: arduino:mbed_nano
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: ./
# Additional library dependencies can be listed here.
# See: https://github.com/arduino/compile-sketches#libraries
sketch-paths: |
- examples
1 change: 1 addition & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
= {repository-name} Library for Arduino =

image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml/badge.svg["Check Arduino status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/check-arduino.yml"]
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"]
image:https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml/badge.svg["Spell Check status", link="https://github.com/{repository-owner}/{repository-name}/actions/workflows/spell-check.yml"]

A library for the APDS-9960 sensor, allows you to read gestures, color, and proximity on your Arduino Nano 33 BLE Sense board and other boards with sensor attached via I2C.

0 comments on commit 7b8c9ea

Please sign in to comment.