Skip to content

Compile Examples

Compile Examples #177

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/**"
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
permissions:
contents: read
env:
LIBRARIES: |
# Install the NetworkConfigurator library from the repository
- source-path: ./
- name: MsgPack
SKETCH_PATHS: |
- examples/decoder_tests
- examples/dispatcher_example
- examples/wrapper_example
- examples/rpc_lite_client
- examples/rpc_lite_server
SKETCHES_REPORTS_PATH: sketches-reports
strategy:
fail-fast: false
matrix:
board:
- 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:mbed_portenta:envie_m7
artifact-name-suffix: arduino-mbed_portenta-envie_m7
- fqbn: arduino:mbed_nano:nanorp2040connect
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
- fqbn: arduino:mbed_nicla:nicla_vision
artifact-name-suffix: arduino-mbed_nicla-nicla_vision
- fqbn: arduino:mbed_opta:opta
artifact-name-suffix: arduino-mbed_opta-opta
- fqbn: arduino:mbed_giga:giga
artifact-name-suffix: arduino-mbed_giga-giga
- fqbn: arduino:renesas_portenta:portenta_c33
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
- fqbn: arduino:renesas_uno:unor4wifi
artifact-name-suffix: arduino-renesas_uno-unor4wifi
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
fqbn: ${{ matrix.board.fqbn }}
libraries: ${{ env.LIBRARIES }}
sketch-paths: ${{ env.SKETCH_PATHS }}
#enable-deltas-report: 'true'
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Save memory usage change report as artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
path: ${{ env.SKETCHES_REPORTS_PATH }}