Skip to content

fix workflow

fix workflow #404

name: Compile Examples
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/compile-examples.ya?ml"
- "Arduino_BHY2/library.properties"
- "Arduino_BHY2/examples/**"
- "Arduino_BHY2/src/**"
- "Arduino_BHY2Host/library.properties"
- "Arduino_BHY2Host/examples/**"
- "Arduino_BHY2Host/src/**"
pull_request:
paths:
- ".github/workflows/compile-examples.ya?ml"
- "Arduino_BHY2/library.properties"
- "Arduino_BHY2/examples/**"
- "Arduino_BHY2/src/**"
- "Arduino_BHY2Host/library.properties"
- "Arduino_BHY2Host/examples/**"
- "Arduino_BHY2Host/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_nicla:nicla_sense
platforms: |
- name: arduino:mbed_nicla
bhy2: true
libraries: |
- name: PacketSerial
bhy2host: false
arduinoiotcloud: false
passthrough: false
blebridge: false
artifact-name-suffix: arduino-mbed_nicla-nicla_sense
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
libraries: |
- name: Arduino_Portenta_OTA
bhy2: false
bhy2host: true
arduinoiotcloud: true
passthrough: true
blebridge: true
artifact-name-suffix: arduino-mbed_portenta-envie_m7
- fqbn: arduino:samd:mkrzero
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrzero
- fqbn: arduino:samd:mkrwifi1010
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: true
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrwifi1010
- fqbn: arduino:samd:mkrwan1310
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrwan1310
- fqbn: arduino:samd:mkrgsm1400
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrgsm1400
- fqbn: arduino:samd:mkrnb1500
platforms: |
- name: arduino:samd
bhy2: false
bhy2host: true
arduinoiotcloud: false
passthrough: true
blebridge: false
artifact-name-suffix: arduino-samd-mkrnb1500
# Make board type-specific customizations to the matrix jobs
include:
- board:
# Boards supported by Arduino_BHY2 library
bhy2: true
# Install these libraries
bhy2-libraries: |
# Install the library from the local path.
- source-path: Arduino_BHY2
- name: ArduinoBLE
# Compile these sketches
bhy2-sketch-paths: |
- Arduino_BHY2/examples
- board:
bhy2: false
bhy2-libraries: ""
bhy2-sketch-paths: ""
- board:
# Boards supported by Arduino_BHY2Host library
bhy2host: true
# Install these libraries
bhy2host-libraries: |
# Install the library from the local path.
- source-path: Arduino_BHY2Host
- name: ArduinoBLE
# Compile these sketches
bhy2host-sketch-paths: |
- Arduino_BHY2Host/examples/Accelerometer
- Arduino_BHY2Host/examples/Orientation
- Arduino_BHY2Host/examples/Temperature
- board:
bhy2host: false
bhy2host-libraries: ""
bhy2host-sketch-paths: ""
- board:
# Boards supported by Arduino IoT Cloud
arduinoiotcloud: true
# Install these libraries in addition to the universal ones
arduinoiotcloud-libraries: |
- name: ArduinoIoTCloud
- name: Arduino_Cellular
# Compile these sketches in addition to the universal ones
arduinoiotcloud-sketch-paths: |
- Arduino_BHY2Host/examples/Nicla_IoT_Bridge
- board:
arduinoiotcloud: false
arduinoiotcloud-libraries: ""
arduinoiotcloud-sketch-paths: ""
- board:
# Boards with passthrough capability
passthrough: true
# Compile these sketches in addition to the universal ones
passthrough-sketch-paths: |
- Arduino_BHY2Host/examples/Passthrough
- board:
passthrough: false
passthrough-sketch-paths: ""
- board:
# Boards supported by Arduino_BHY2 library
blebridge: true
# Install these libraries
blebridge-libraries: |
- name: ArduinoIoTCloud
- name: Arduino_Cellular
# Compile these sketches
blebridge-sketch-paths: |
- Arduino_BHY2Host/examples/Portenta_BLE_Bridge
- board:
blebridge: false
blebridge-libraries: ""
blebridge-sketch-paths: ""
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: |
# Board-specific libraries
${{ matrix.bhy2-libraries }}
${{ matrix.bhy2host-libraries }}
${{ matrix.board.libraries }}
${{ matrix.arduinoiotcloud-libraries }}
${{ matrix.blebridge-libraries }}
sketch-paths: |
${{ matrix.bhy2-sketch-paths }}
${{ matrix.bhy2host-sketch-paths }}
${{ matrix.arduinoiotcloud-sketch-paths }}
${{ matrix.blebridge-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 }}