Compile Examples #242
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 | |
# 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: | |
SKETCHES_REPORTS_PATH: sketches-reports | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: arduino:mbed_nano:nano33ble | |
platforms: | | |
- name: arduino:mbed_nano | |
libraries: | | |
- name: Arduino_APDS9960 | |
- name: Arduino_HTS221 | |
- name: Arduino_LPS22HB | |
- name: Arduino_LSM9DS1 | |
- name: ArduinoBLE | |
- name: Arduino_CMSIS-DSP | |
sketch-paths: examples/ScienceKit/Nano33BLESenseFirmware | |
artifact-name-suffix: arduino-mbed_nano-nano33ble-1 | |
- fqbn: arduino:mbed_nano:nanorp2040connect | |
platforms: | | |
- name: arduino:mbed_nano | |
libraries: | | |
- name: Arduino_LSM6DSOX | |
- name: ArduinoBLE | |
sketch-paths: examples/ScienceKit/RP2040ConnectFirmware | |
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect | |
- fqbn: arduino:samd:mkrwifi1010 | |
platforms: | | |
- name: arduino:samd | |
libraries: | | |
- name: ArduinoBLE | |
- name: Adafruit LSM9DS1 Library | |
sketch-paths: examples/ScienceKit/PhysicsLabFirmware | |
artifact-name-suffix: arduino-samd-mkrwifi1010-1 | |
- fqbn: arduino:mbed_nano:nano33ble | |
platforms: | | |
- name: arduino:mbed_nano | |
libraries: | | |
- name: Arduino_APDS9960 | |
- name: Arduino_HTS221 | |
- name: Arduino_LPS22HB | |
- name: Arduino_LSM6DSOX | |
- name: Arduino_BMI270_BMM150 | |
- name: INA2xx | |
- name: SerialFlash | |
- name: ArduinoBLE | |
- name: Arduino_CMSIS-DSP | |
sketch-paths: examples/ScienceKitR2/Nano33BLESenseFirmware | |
artifact-name-suffix: arduino-mbed_nano-nano33ble-2 | |
- fqbn: arduino:samd:mkrwifi1010 | |
platforms: | | |
- name: arduino:samd | |
libraries: | | |
- name: ArduinoBLE | |
- name: Arduino_LSM6DSOX | |
- name: Arduino_BMI270_BMM150 | |
- name: INA2xx | |
- name: SerialFlash | |
sketch-paths: examples/ScienceKitR2/PhysicsLabFirmware | |
artifact-name-suffix: arduino-samd-mkrwifi1010-2 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- 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: ./ | |
# Board-specific library dependencies | |
${{ matrix.board.libraries }} | |
sketch-paths: | | |
${{ matrix.board.sketch-paths }} | |
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 }} |