Compile Examples #220
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: arduino:avr:nano | |
platforms: | | |
- name: arduino:avr | |
type: arduino | |
artifact-name-suffix: arduino-avr-uno | |
- fqbn: arduino:avr:mega | |
platforms: | | |
- name: arduino:avr | |
type: arduino | |
artifact-name-suffix: arduino-avr-mega | |
- fqbn: arduino:avr:leonardo | |
platforms: | | |
- name: arduino:avr | |
type: arduino | |
artifact-name-suffix: arduino-avr-leonardo | |
- fqbn: arduino:avr:esplora | |
platforms: | | |
- name: arduino:avr | |
type: esplora | |
artifact-name-suffix: arduino-avr-esplora | |
- fqbn: arduino:megaavr:nona4809 | |
platforms: | | |
- name: arduino:megaavr | |
type: arduino | |
artifact-name-suffix: arduino-megaavr-nona4809 | |
- fqbn: arduino:sam:arduino_due_x_dbg | |
platforms: | | |
- name: arduino:sam | |
type: arduino | |
artifact-name-suffix: arduino-sam-arduino_due_x_dbg | |
- fqbn: arduino:samd:mkrzero | |
platforms: | | |
- name: arduino:samd | |
type: arduino | |
artifact-name-suffix: arduino-samd-mkrzero | |
# Make board type-specific customizations to the matrix jobs | |
include: | |
- board: | |
# Boards to compile the Esplora-specific examples for | |
type: esplora | |
libraries: | | |
- name: Esplora | |
sketch-paths: | | |
- examples/Esplora | |
- board: | |
# Boards to compile the general examples for | |
type: arduino | |
libraries: "" | |
sketch-paths: | | |
- examples/Arduino | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- 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: SD | |
${{ matrix.libraries }} | |
sketch-paths: | | |
${{ matrix.sketch-paths }} | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- name: Save sketches report as workflow artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
name: sketches-report-${{ matrix.board.artifact-name-suffix }} |