Skip to content

Compile Examples

Compile Examples #333

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_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
libraries: |
- name: Arduino_DebugUtils
sketch-paths: |
- examples/OTA_Qspi_Flash
- examples/OTA_Qspi_Flash_Ethernet
- examples/OTA_SD_Portenta
- examples/OTA_Usage_Portenta
- examples/LZSS
- examples/OTA_Qspi_Flash_download_onthefly
artifact-name-suffix: arduino-mbed_portenta-envie_m7
- fqbn: arduino:mbed_nicla:nicla_vision
platforms: |
- name: arduino:mbed_nicla
libraries: |
- name: Arduino_DebugUtils
sketch-paths: |
- examples/OTA_Qspi_Flash
- examples/OTA_Usage_Portenta
- examples/LZSS
- examples/OTA_Qspi_Flash_download_onthefly
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
- fqbn: arduino:mbed_opta:opta
platforms: |
- name: arduino:mbed_opta
libraries: |
- name: Arduino_DebugUtils
sketch-paths: |
- examples/OTA_Qspi_Flash
- examples/OTA_Qspi_Flash_Ethernet
- examples/OTA_Usage_Portenta
- examples/LZSS
- examples/OTA_Qspi_Flash_download_onthefly
artifact-name-suffix: arduino-mbed_opta-opta
- fqbn: arduino:mbed_giga:giga
platforms: |
- name: arduino:mbed_giga
libraries: |
- name: Arduino_DebugUtils
sketch-paths: |
- examples/OTA_Qspi_Flash
- examples/OTA_Usage_Portenta
- examples/LZSS
- examples/OTA_Qspi_Flash_download_onthefly
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 }}
platforms: ${{ matrix.board.platforms }}
libraries: |
# Install the library from the local path.
- source-path: ./
${{ matrix.board.libraries }}
sketch-paths: |
${{ matrix.board.sketch-paths }}
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:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: sketches-report-${{ matrix.board.artifact-name-suffix }}