Compile Examples #49
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 | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
push: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "library.properties" | |
- "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: | |
name: ${{ matrix.board.fqbn }} | |
runs-on: ubuntu-latest | |
env: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: "arduino:samd:mkr1000" | |
platform-name: arduino:samd | |
- fqbn: "arduino:samd:mkrwifi1010" | |
platform-name: arduino:samd | |
- fqbn: "arduino:samd:nano_33_iot" | |
platform-name: arduino:samd | |
- fqbn: "arduino:samd:mkrgsm1400" | |
platform-name: arduino:samd | |
- fqbn: "arduino:samd:mkrnb1500" | |
platform-name: arduino:samd | |
- fqbn: "arduino:mbed_portenta:envie_m7" | |
platform-name: arduino:mbed_portenta | |
- fqbn: arduino:mbed_nano:nanorp2040connect | |
platform-name: arduino:mbed_nano | |
- fqbn: arduino:mbed_nicla:nicla_vision | |
platform-name: arduino:mbed_nicla | |
- fqbn: arduino:mbed_opta:opta | |
platform-name: arduino:mbed_opta | |
- fqbn: arduino:mbed_giga:giga | |
platform-name: arduino:mbed_giga | |
- fqbn: arduino:renesas_portenta:portenta_c33 | |
platform-name: arduino:renesas_portenta | |
- fqbn: arduino:renesas_uno:unor4wifi | |
platform-name: arduino:renesas_uno | |
include: | |
- board: | |
platform-name: arduino:samd | |
platforms: | | |
# Install Arduino SAMD Boards via Boards Manager | |
- name: arduino:samd | |
libraries: | | |
- name: ArduinoECCX08 | |
- board: | |
platform-name: arduino:mbed_portenta | |
platforms: | | |
# Install Arduino mbed_portenta Boards via Boards Manager | |
- name: arduino:mbed_portenta | |
libraries: | | |
- name: ArduinoECCX08 | |
- board: | |
platform-name: arduino:mbed_nano | |
platforms: | | |
# Install Arduino mbed_nano Boards via Boards Manager | |
- name: arduino:mbed_nano | |
libraries: | | |
- name: ArduinoECCX08 | |
- board: | |
platform-name: arduino:mbed_nicla | |
platforms: | | |
# Install Arduino mbed_nano Boards via Boards Manager | |
- name: arduino:mbed_nicla | |
- board: | |
platform-name: arduino:mbed_opta | |
platforms: | | |
# Install Arduino mbed_opta Boards via Boards Manager | |
- name: arduino:mbed_opta | |
libraries: | | |
- name: ArduinoECCX08 | |
- board: | |
platform-name: arduino:mbed_giga | |
platforms: | | |
# Install Arduino mbed_giga Boards via Boards Manager | |
- name: arduino:mbed_giga | |
libraries: | | |
- name: ArduinoECCX08 | |
- board: | |
platform-name: arduino:renesas_portenta | |
platforms: | | |
# Install Arduino renesas_portenta Boards via Boards Manager | |
- name: arduino:renesas_portenta | |
- board: | |
platform-name: arduino:renesas_uno | |
platforms: | | |
# Install Arduino renesas_uno Boards via Boards Manager | |
- name: arduino:renesas_uno | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install ESP32 platform dependencies | |
if: matrix.board.platform-name == 'esp32' | |
run: pip3 install pyserial | |
- name: Compile examples | |
uses: arduino/compile-sketches@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
platforms: ${{ matrix.platforms }} | |
fqbn: ${{ matrix.board.fqbn }} | |
libraries: | | |
# Install the library from the local path. | |
- source-path: ./ | |
${{ matrix.libraries }} | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- name: Save memory usage change report as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.SKETCHES_REPORTS_PATH }} | |
if-no-files-found: error | |
path: ${{ env.SKETCHES_REPORTS_PATH }} |