Compile Examples #210
This file contains 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:samd:mkrwan1300 | |
platforms: | | |
- name: arduino:samd | |
updater: true | |
artifact-name-suffix: arduino-samd-mkrwan1300 | |
- fqbn: arduino:samd:mkrwan1310 | |
platforms: | | |
- name: arduino:samd | |
updater: true | |
artifact-name-suffix: arduino-samd-mkrwan1310 | |
- fqbn: arduino:mbed_portenta:envie_m7:target_core=cm4 | |
platforms: | | |
- name: arduino:mbed_portenta | |
updater: false | |
artifact-name-suffix: arduino-mbed_portenta-envie_m7-target_core-cm4 | |
- fqbn: arduino:mbed_portenta:envie_m7 | |
platforms: | | |
- name: arduino:mbed_portenta | |
updater: true | |
artifact-name-suffix: arduino-mbed_portenta-envie_m7 | |
# make board type-specific customizations to the matrix jobs | |
include: | |
- board: | |
updater: true | |
sketch-paths: | | |
- examples/FWUpdaterBridge | |
- examples/MKRWANFWUpdate_standalone | |
- board: | |
updater: false | |
sketch-paths: "" | |
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: LoRa | |
sketch-paths: | | |
# Compile these sketches for all boards | |
- examples/DumbModemLoraSender | |
- examples/FirstConfiguration | |
- examples/LoraSendAndReceive | |
# Board-specific sketches | |
${{ 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 }} |