Arduino-Compile Sample Code #25
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
# Part of the Arduino Servo Library, released under the GNU Lesser General Public License v2.1. | |
# Micah Mundy hereby disclaims all copyright interest in this file written the Arduino community. | |
name: Arduino-Compile Sample Code | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows | |
on: | |
push: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "examples/**" | |
- "src/**" | |
pull_request: | |
paths: | |
- ".github/workflows/compile-examples.yml" | |
- "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: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: arduino:avr:nano | |
platforms: | | |
- name: arduino:avr | |
- fqbn: arduino:avr:mega | |
platforms: | | |
- name: arduino:avr | |
- fqbn: arduino:avr:leonardo | |
platforms: | | |
- name: arduino:avr | |
- fqbn: arduino:megaavr:nona4809 | |
platforms: | | |
- name: arduino:megaavr | |
# - fqbn: arduino:sam:arduino_due_x_dbg # When this was enabled, it would fail. | |
# platforms: | # Linker error: undefined reference to `setup' and `loop' | |
# - name: arduino:sam | |
- fqbn: arduino:samd:mkrzero | |
platforms: | | |
- name: arduino:samd | |
- fqbn: arduino:mbed_portenta:envie_m7:target_core=cm4 | |
platforms: | | |
- name: arduino:mbed_portenta | |
- fqbn: arduino:mbed_portenta:envie_m7 | |
platforms: | | |
- name: arduino:mbed_portenta | |
- fqbn: arduino:mbed_nano:nano33ble | |
platforms: | | |
- name: arduino:mbed_nano | |
- fqbn: arduino:mbed_nano:nanorp2040connect | |
platforms: | | |
- name: arduino:mbed_nano | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- 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: | | |
- examples | |
enable-deltas-report: true | |
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} | |
- name: Save sketches report as workflow artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
path: ${{ env.SKETCHES_REPORTS_PATH }} | |
name: ${{ env.SKETCHES_REPORTS_PATH }} |