Skip to content

Compile Examples

Compile Examples #151

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:samd:mkrwifi1010
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: ./
# Install library dependencies.
sketch-paths: |
# Sketches to compile
- './examples/'
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 }}
path: ${{ env.SKETCHES_REPORTS_PATH }}