Compile Examples
8000
Compile Examples #240
This file contains hidden or 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 | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows | |
on: | |
push: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
pull_request: | |
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 | |
env: | |
BUILT_IN_EXAMPLES_PATH: extras/arduino-examples | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: ar 4A43 duino:avr:leonardo | |
platforms: | | |
- name: arduino:avr | |
artifact-name-suffix: arduino-avr-leonardo | |
- fqbn: arduino:sam:arduino_due_x_dbg | |
platforms: | | |
- name: arduino:sam | |
artifact-name-suffix: arduino-sam-arduino_due_x_dbg | |
- fqbn: arduino:samd:arduino_zero_edbg | |
platforms: | | |
- name: arduino:samd | |
artifact-name-suffix: arduino-samd-arduino_zero_edbg | |
- fqbn: arduino:samd:mkrzero | |
platforms: | | |
- name: arduino:samd | |
artifact-name-suffix: arduino-samd-mkrzero | |
- fqbn: arduino:samd:nano_33_iot | |
platforms: | | |
- name: arduino:samd | |
artifact-name-suffix: arduino-samd-nano_33_iot | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Checkout built-in examples | |
uses: actions/checkout@v4 | |
with: | |
repository: arduino/arduino-examples | |
path: ${{ env.BUILT_IN_EXAMPLES_PATH }} | |
- name: Compile examples | |
uses: arduino/compile-sketches@v1 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
fqbn: ${{ matrix.board.fqbn }} | |
platforms: ${{ matrix.board.platforms }} | |
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: | | |
- ${{ env.BUILT_IN_EXAMPLES_PATH }}/examples/09.USB/Mouse | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- name: Save sketches report as workflow 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 }} |