1
+ # Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples.md
1
2
name : Compile Examples
2
3
3
- on :
4
+ # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
5
+ on :
4
6
push :
5
- branches : [main]
7
+ paths :
8
+ - " .github/workflows/compile-examples.ya?ml"
9
+ - " library.properties"
10
+ - " examples/**"
11
+ - " src/**"
6
12
pull_request :
7
- branches : [main]
8
- # Scheduled trigger checks for breakage caused by changes to external resources (libraries, platforms)
13
+ paths :
14
+ - " .github/workflows/compile-examples.ya?ml"
15
+ - " library.properties"
16
+ - " examples/**"
17
+ - " src/**"
9
18
schedule :
10
- # run every Tuesday at 3 AM UTC
11
- - cron : " 0 3 * * 2"
12
- # workflow_dispatch event allows the workflow to be triggered manually
13
- # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
19
+ # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
20
+ - cron : " 0 8 * * TUE"
14
21
workflow_dispatch :
15
- # repository_dispatch event allows the workflow to be triggered via the GitHub API
16
- # See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch
17
22
repository_dispatch :
18
23
19
- env :
20
- SKETCHES_REPORTS_PATH : sketches-reports
21
- SKETCHES_REPORTS_ARTIFACT_NAME : sketches-reports
22
-
23
24
jobs :
24
- compile-examples :
25
+ build :
26
+ name : ${{ matrix.board.fqbn }}
25
27
runs-on : ubuntu-latest
28
+ permissions : {}
29
+
30
+ env :
31
+ SKETCHES_REPORTS_PATH : sketches-reports
32
+
33
+ strategy :
34
+ fail-fast : false
35
+
36
+ matrix :
37
+ board :
38
+ # TODO: Add list of boards to compile for here:
39
+ - fqbn : arduino:mbed_portenta:envie_m7
40
+ # TODO: Define the board's platform dependencies here.
41
+ # See: https://github.com/arduino/compile-sketches#platforms
42
+ platforms : |
43
+ - name: arduino:mbed_portenta
26
44
27
45
steps :
28
46
- name : Checkout repository
29
47
uses : actions/checkout@v3
30
48
31
- - name : Compile example sketches
49
+ - name : Compile examples
32
50
uses : arduino/compile-sketches@v1
33
51
with :
34
- fqbn : arduino:mbed_portenta:envie_m7
35
- platforms : |
36
- - name: arduino:mbed_portenta
52
+ github-token : ${{ secrets.GITHUB_TOKEN }}
53
+ fqbn : ${{ matrix.board.fqbn }}
54
+ platforms : ${{ matrix.board.platforms }}
37
55
libraries : |
38
- - source-path: https://github.com/arduino-libraries/Arduino_POSIXStorage/
56
+ # Install the library from the local path.
57
+ - source-path: ./
58
+ # Additional library dependencies can be listed here.
59
+ # See: https://github.com/arduino/compile-sketches#libraries
39
60
sketch-paths : |
40
- - examples
61
+ - examples
41
62
enable-deltas-report : true
42
- enable-warnings-report : true
43
63
sketches-report-path : ${{ env.SKETCHES_REPORTS_PATH }}
44
- github-token : ${{ secrets.GITHUB_TOKEN }}
45
64
46
- - name : Save memory usage change report as artifact
65
+ - name : Save sketches report as workflow artifact
47
66
uses : actions/upload-artifact@v3
48
67
with :
49
68
if-no-files-found : error
50
69
path : ${{ env.SKETCHES_REPORTS_PATH }}
51
- name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
70
+ name : ${{ env.SKETCHES_REPORTS_PATH }}
0 commit comments