Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

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, compile all example sketches for the
specified boards.
  • Loading branch information
per1234 committed Dec 25, 2020
1 parent 54afe14 commit 2925031
Showing 1 changed file with 72 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Compile Examples

on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
# Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
schedule:
# run every Saturday at 3 AM UTC
- cron: "0 3 * * 6"
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
repository_dispatch:

jobs:
build:
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false

matrix:
board:
- fqbn: arduino:samd:arduino_zero_edbg
- fqbn: arduino:samd:mkr1000
- fqbn: arduino:samd:mkrzero
- fqbn: arduino:samd:mkrwifi1010
- fqbn: arduino:samd:nano_33_iot
- fqbn: arduino:samd:mkrfox1200
- fqbn: arduino:samd:mkrwan1300
- fqbn: arduino:samd:mkrwan1310
- fqbn: arduino:samd:mkrgsm1400
- fqbn: arduino:samd:mkrnb1500
- fqbn: arduino:samd:mkrvidor4000
- fqbn: arduino:mbed:envie_m7
- fqbn: arduino:mbed:envie_m4
- fqbn: arduino:mbed:nano33ble

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Compile examples
uses: arduino/compile-sketches@main
with:
fqbn: ${{ matrix.board.fqbn }}
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/
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save memory usage change report as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
path: ${{ env.SKETCHES_REPORTS_PATH }}

0 comments on commit 2925031

Please sign in to comment.