-
Notifications
You must be signed in to change notification settings - Fork 15
137 lines (126 loc) · 4.2 KB
/
compile-examples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Compile Examples
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "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:
jobs:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest
env:
SKETCHES_REPORTS_PATH: sketches-reports
strategy:
fail-fast: false
matrix:
board:
- fqbn: arduino:samd:nano_33_iot
platforms: |
- name: arduino:samd
type: nano
artifact-name-suffix: arduino-samd-nano_33_iot
- fqbn: arduino:samd:mkr1000
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkr1000
- fqbn: arduino:samd:mkrzero
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrzero
- fqbn: arduino:samd:mkrwifi1010
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrwifi1010
- fqbn: arduino:samd:mkrfox1200
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrfox1200
- fqbn: arduino:samd:mkrwan1300
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrwan1300
- fqbn: arduino:samd:mkrwan1310
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrwan1310
- fqbn: arduino:samd:mkrgsm1400
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrgsm1400
- fqbn: arduino:samd:mkrnb1500
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrnb1500
- fqbn: arduino:samd:mkrvidor4000
platforms: |
- name: arduino:samd
type: mkr
artifact-name-suffix: arduino-samd-mkrvidor4000
- fqbn: arduino:mbed_portenta:envie_m7:target_core=cm4
platforms: |
- name: arduino:mbed_portenta
type: mkr
- fqbn: arduino:mbed_portenta:envie_m7
platforms: |
- name: arduino:mbed_portenta
type: mkr
artifact-name-suffix: arduino-mbed_portenta-envie_m7
# make board type-specific customizations to the matrix jobs
include:
- board:
type: nano
libraries: |
- name: BNO055
- name: Arduino_BQ24195
sketch-paths: |
- examples/NanoMotorCarrier
- board:
type: mkr
libraries: |
-
sketch-paths: |
- examples/MKRMotorCarrier
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: |
# Install the library from the local path.
- source-path: ./
${{ matrix.libraries }}
sketch-paths: |
- examples/Flasher
${{ matrix.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 }}