Skip to content

Compile Examples

Compile Examples #337

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:megaavr:uno2018
platforms: |
- name: arduino:megaavr
libraries: |
- name: WiFiNINA
artifact-name-suffix: arduino-megaavr-uno2018
- fqbn: arduino:samd:mkrwifi1010
platforms: |
- name: arduino:samd
libraries: |
- name: WiFiNINA
artifact-name-suffix: arduino-samd-mkrwifi1010
- fqbn: arduino:samd:mkr1000
platforms: |
- name: arduino:samd
libraries: |
- name: WiFi101
artifact-name-suffix: arduino-samd-mkr1000
- fqbn: arduino:samd:nano_33_iot
platforms: |
- name: arduino:samd
libraries: |
- name: WiFiNINA
artifact-name-suffix: arduino-samd-nano_33_iot
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
libraries: ""
artifact-name-suffix: arduino-mbed_portenta-envie_m7
- fqbn: arduino:mbed_nicla:nicla_vision
platforms: |
- name: arduino:mbed_nicla
libraries: ""
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
- fqbn: arduino:mbed_opta:opta
platforms: |
- name: arduino:mbed_opta
libraries: ""
artifact-name-suffix: arduino-mbed_opta-opta
- fqbn: arduino:mbed_giga:giga
platforms: |
- name: arduino:mbed_giga
libraries: ""
artifact-name-suffix: arduino-mbed_giga-giga
- fqbn: arduino:renesas_portenta:portenta_c33
platforms: |
- name: arduino:renesas_portenta
libraries: ""
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
- fqbn: arduino:renesas_uno:unor4wifi
platforms: |
- name: arduino:renesas_uno
libraries: ""
artifact-name-suffix: arduino-renesas_uno-unor4wifi
- fqbn: arduino:esp32:nano_nora
platforms: |
- name: arduino:esp32
libraries: ""
artifact-name-suffix: arduino-esp32-nano_nora
- fqbn: esp8266:esp8266:huzzah
platforms: |
- name: esp8266:esp8266
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
libraries: ""
artifact-name-suffix: esp8266-esp8266-huzzah
- fqbn: "esp32:esp32:esp32"
platforms: |
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
libraries: ""
artifact-name-suffix: esp32-esp32-esp32
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: ./
${{ matrix.board.libraries }}
sketch-paths: |
- examples
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 }}