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
+ - extras/tests
27
+ - examples/AdvancedUSBInternalOperations
28
+ - examples/BackupInternalPartitions
29
+ - examples/Callbacks
30
+ - examples/InternalStoragePartitioning
31
+ - examples/Logger
32
+ - examples/SimpleStorageWriteRead
33
+ SKETCHES_REPORTS_PATH : sketches-reports
34
+ SKETCHES_REPORTS_ARTIFACT_NAME : sketches-reports
35
+
36
+ jobs :
37
+ build :
38
+ name : ${{ matrix.board.fqbn }}
39
+ runs-on : ubuntu-latest
40
+ permissions :
41
+ contents : read
42
+ pull-requests : read
43
+
44
+ strategy :
45
+ fail-fast : false
46
+
47
+ matrix :
48
+ board :
49
+ - fqbn : arduino:mbed_portenta:envie_m7
50
+ platforms : |
51
+ - name: arduino:mbed_portenta
52
+ artifact-name-suffix : arduino-mbed_portenta-envie_m7
53
+ - fqbn : arduino:renesas_portenta:portenta_c33
54
+ platforms : |
55
+ - name: arduino:renesas_portenta
56
+ artifact-name-suffix : arduino-renesas_portenta-portenta_c33
57
+ - fqbn : arduino:mbed_opta:opta
58
+ platforms : |
59
+ - name: arduino:mbed_opta
60
+ artifact-name-suffix : arduino-mbed_opta-opta
61
+
62
+ steps :
63
+ - name : Checkout repository
64
+ uses : actions/checkout@v4
65
+
66
+ - name : Compile examples
67
+ uses : arduino/compile-sketches@v1
68
+ with :
69
+ github-token : ${{ secrets.GITHUB_TOKEN }}
70
+ fqbn : ${{ matrix.board.fqbn }}
71
+ platforms : ${{ matrix.board.platforms }}
72
+ libraries : |
73
+ # Install the library from the local path.
74
+ - source-path: ./
75
+ - name: Arduino_USBHostMbed5
76
+ - name: Arduino_POSIXStorage
77
+ - name: ArduinoRS485
78
+ # Additional library dependencies can be listed here.
79
+ # See: https://github.com/arduino/compile-sketches#libraries
80
+ sketch-paths : |
81
+ ${{ env.UNIVERSAL_SKETCH_PATHS }}
82
+ ${{ matrix.board.additional-sketch-paths }}
83
+ enable-deltas-report : true
84
+ sketches-report-path : ${{ env.SKETCHES_REPORTS_PATH }}
85
+
86
+ - name : Save sketches report as workflow artifact
87
+ uses : actions/upload-artifact@v4
88
+ with :
89
+ if-no-files-found : error
90
+ name : sketches-report-${{ matrix.board.artifact-name-suffix }}
91
+ path : ${{ env.SKETCHES_REPORTS_PATH }}
0 commit comments