1+ # Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md
2+ name : Compile Examples
3+
4+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5+ on :
6+ push :
7+ paths :
8+ - " .github/workflows/compile-examples.ya?ml"
9+ - " library.properties"
10+ - " examples/**"
11+ - " src/**"
12+ pull_request :
13+ paths :
14+ - " .github/workflows/compile-examples.ya?ml"
15+ - " library.properties"
16+ - " examples/**"
17+ - " src/**"
18+ schedule :
19+ # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
20+ - cron : " 0 8 * * TUE"
21+ workflow_dispatch :
22+ repository_dispatch :
23+
24+ env :
25+ UNIVERSAL_SKETCH_PATHS : |
26+ - examples
27+ SKETCHES_REPORTS_PATH : sketches-reports
28+ SKETCHES_REPORTS_ARTIFACT_NAME : sketches-reports
29+
30+ jobs :
31+ build :
32+ name : ${{ matrix.board.fqbn }}
33+ runs-on : ubuntu-latest
34+ permissions :
35+ contents : read
36+ pull-requests : read
37+
38+ strategy :
39+ fail-fast : false
40+
41+ matrix :
42+ board :
43+ - fqbn : arduino:zephyr:unoq
44+ platforms : |
45+ - name: arduino:zephyr
46+ artifact-name-suffix : arduino-uno_q
47+
48+ steps :
49+ - name : Checkout repository
50+ uses : actions/checkout@v5
51+
52+ - name : Compile examples
53+ uses : arduino/compile-sketches@v1
54+ with :
55+ github-token : ${{ secrets.GITHUB_TOKEN }}
56+ fqbn : ${{ matrix.board.fqbn }}
57+ platforms : ${{ matrix.board.platforms }}
58+ libraries : |
59+ # Install the library from the local path.
60+ - source-path: ./
61+ - name: Arduino_RPClite
62+ # Additional library dependencies can be listed here.
63+ # See: https://github.com/arduino/compile-sketches#libraries
64+ sketch-paths : |
65+ ${{ env.UNIVERSAL_SKETCH_PATHS }}
66+ ${{ matrix.board.additional-sketch-paths }}
67+ enable-deltas-report : true
68+ sketches-report-path : ${{ env.SKETCHES_REPORTS_PATH }}
69+
70+ - name : Save sketches report as workflow artifact
71+ uses : actions/upload-artifact@v5
72+ with :
73+ if-no-files-found : error
74+ name : sketches-report-${{ matrix.board.artifact-name-suffix }}
75+ path : ${{ env.SKETCHES_REPORTS_PATH }}
0 commit comments