Compile Examples #107
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
# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md | |
name: Compile Examples | |
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows | |
on: | |
push: | |
paths: | |
- ".github/workflows/compile-examples.ya?ml" | |
- "library.properties" | |
- "examples/**" | |
- "src/**" | |
pull_request: | |
paths: | |
- ".github/workflows/compile-examples.ya?ml" | |
- "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: | |
env: | |
UNIVERSAL_SKETCH_PATHS: | | |
- examples/Battery | |
- examples/Charger | |
SKETCHES_REPORTS_PATH: sketches-reports | |
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports | |
jobs: | |
build: | |
name: ${{ matrix.board.fqbn }} | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
pull-requests: read | |
strategy: | |
fail-fast: false | |
matrix: | |
board: | |
- fqbn: arduino:mbed_portenta:envie_m7 | |
platforms: | | |
- name: arduino:mbed_portenta | |
artifact-name-suffix: arduino-mbed_portenta-envie_m7 | |
additional-sketch-paths: | | |
- examples/Standby_WakeFromRTC_H7 | |
- examples/Standby_WakeFromPin | |
- fqbn: arduino:renesas_portenta:portenta_c33 | |
platforms: | | |
- name: arduino:renesas_portenta | |
artifact-name-suffix: arduino-renesas_portenta-portenta_c33 | |
additional-sketch-paths: | | |
- examples/Standby_WakeFromRTC_C33 | |
- examples/Standby_WakeFromPin | |
- fqbn: arduino:mbed_nicla:nicla_vision | |
platforms: | | |
- name: arduino:mbed_nicla | |
artifact-name-suffix: arduino-mbed_nicla-nicla_vision | |
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: | | |
- source-path: ./ | |
- name: Arduino_PF1550 | |
- name: Arduino_LowPowerPortentaH7 | |
- source-url: https://github.com/arduino-libraries/Arduino_LowPowerPortentaC33.git | |
sketch-paths: | | |
${{ env.UNIVERSAL_SKETCH_PATHS }} | |
${{ matrix.board.additional-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 | |
name: sketches-report-${{ matrix.board.artifact-name-suffix }} | |
path: ${{ env.SKETCHES_REPORTS_PATH }} |