Skip to content

Compile Examples

Compile Examples #242

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:mbed:envie_m7
artifact-name-suffix: arduino-mbed-envie_m7
- fqbn: arduino:megaavr:uno2018
artifact-name-suffix: arduino-megaavr-uno2018
- fqbn: arduino:samd:mkr1000
artifact-name-suffix: arduino-samd-mkr1000
- fqbn: arduino:samd:mkrwifi1010
artifact-name-suffix: arduino-samd-mkrwifi1010
- fqbn: arduino:samd:nano_33_iot
artifact-name-suffix: arduino-samd-nano_33_iot
- fqbn: arduino:samd:mkrwan1300
artifact-name-suffix: arduino-samd-mkr1300
- fqbn: arduino:samd:mkrwan1310
artifact-name-suffix: arduino-samd-mkrwan1310
- fqbn: arduino:samd:mkrgsm1400
artifact-name-suffix: arduino-samd-mkrgsm1400
- fqbn: arduino:samd:mkrnb1500
artifact-name-suffix: arduino-samd-mkrnb1500
- fqbn: arduino:samd:mkrvidor4000
artifact-name-suffix: arduino-samd-mkrvidor4000
- fqbn: arduino:mbed_nano:nanorp2040connect
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
- fqbn: arduino:mbed_opta:opta
artifact-name-suffix: arduino-mbed_opta-opta
- fqbn: arduino:mbed_giga:giga
artifact-name-suffix: arduino-mbed_giga-giga
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile examples
uses: arduino/compile-sketches@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
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@v4
with:
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
path: ${{ env.SKETCHES_REPORTS_PATH }}