You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The version of [Arduino CLI](https://github.com/arduino/arduino-cli) to use. Default `"latest"`.
44
+
The version of [Arduino CLI](https://github.com/arduino/arduino-cli) to use.
45
+
46
+
**Default**: `"latest"`
10
47
11
48
### `fqbn`
12
49
13
-
The fully qualified board name to use when compiling. Default `"arduino:avr:uno"`.
50
+
The fully qualified board name to use when compiling.
51
+
52
+
**Default**: `"arduino:avr:uno"`
14
53
15
54
If the board is from one of the platforms provided by Arduino's [default package index](https://downloads.arduino.cc/packages/package_index.json), the board's platform dependency will be automatically detected and the latest version installed. For boards of platforms not in the default package index, previous versions, or other platform sources, the platform dependency must be defined via the [`platforms` input](#platforms).
16
55
17
56
### `platforms`
18
57
19
-
YAML-format list of platform dependencies to install.
58
+
[YAML](https://en.wikipedia.org/wiki/YAML)-format list of platform dependencies to install.
20
59
21
-
Default`""`. If no `platforms` input is provided, the board's dependency will be automatically determined from the `fqbn` input and the latest version of that platform will be installed via Boards Manager.
60
+
**Default**: The board's dependency will be automatically determined from the `fqbn` input and the latest version of that platform will be installed via Boards Manager.
22
61
23
62
If a platform dependency from a non-Boards Manager source of the same name as another Boards Manager source platform dependency is defined, they will both be installed, with the non-Boards Manager dependency overwriting the Boards Manager platform installation. This permits testing against a non-release version of a platform while using Boards Manager to install the platform's tools dependencies.
24
63
Example:
@@ -31,120 +70,152 @@ platforms: |
31
70
name: "arduino:samd"
32
71
```
33
72
34
-
#### Sources:
73
+
#### Supported platform sources:
35
74
36
75
##### Boards Manager
37
76
38
77
Keys:
39
-
- `name` - platform name in the form of `VENDOR:ARCHITECTURE`.
40
-
- `version`- version of the platform to install. Default is the latest version.
41
-
- `source-url`- Boards Manager URL of the platform. Default is Arduino's package index, which allows installation of all official platforms.
78
+
- **`name`** - (**required**) platform name in the form of `VENDOR:ARCHITECTURE` (e.g., `arduino:avr`).
79
+
- **`version`** - version of the platform to install.
80
+
- **Default**: the latest version.
81
+
- **`source-url`** - Boards Manager URL of the platform.
82
+
- **Default**: Arduino's package index, which allows installation of all official platforms.
42
83
43
84
##### Local path
44
85
45
86
Keys:
46
-
- `source-path`- path to install as a platform. Relative paths are assumed to be relative to the root of the repository.
47
-
- `name`- platform name in the form of `VENDOR:ARCHITECTURE`.
87
+
- **`source-path`** - (**required**) path to install as a platform. Relative paths are assumed to be relative to the root of the repository.
88
+
- **`name`** - (**required**) platform name in the form of `VENDOR:ARCHITECTURE` (e.g., `arduino:avr`).
48
89
49
90
##### Repository
50
91
51
92
Keys:
52
-
- `source-url`- URL to clone the repository from. It must start with `git://` or end with `.git`.
53
-
- `version`- [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) of the repository to checkout. The special version name `latest` will cause the latest tag to be used. By default, the repository will be checked out to the tip of the default branch.
54
-
- `source-path`- path to install as a platform. Paths are relative to the root of the repository. The default is to install from the root of the repository.
55
-
- `name`- platform name in the form of `VENDOR:ARCHITECTURE`.
93
+
- **`source-url`** - (**required**) URL to clone the repository from. It must start with `git://` or end with `.git`.
94
+
- **`name`** - (**required**) platform name in the form of `VENDOR:ARCHITECTURE` (e.g., `arduino:avr`).
95
+
- **`version`** - [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) of the repository to checkout. The special version name `latest` will cause the latest tag to be used.
96
+
- **Default**: the repository is checked out to the tip of the default branch.
97
+
- **`source-path`** - path to install as a platform. Paths are relative to the root of the repository.
98
+
- **Default**: root of the repository.
56
99
57
100
##### Archive download
58
101
59
102
Keys:
60
-
- `source-url`- download URL for the archive (e.g., `https://github.com/arduino/ArduinoCore-avr/archive/master.zip`).
61
-
- `source-path`- path to install as a platform. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder. The default is to install from the root folder of the archive.
62
-
- `name`- platform name in the form of `VENDOR:ARCHITECTURE`.
103
+
- **`source-url`** - (**required**) download URL for the archive (e.g., `https://github.com/arduino/ArduinoCore-avr/archive/master.zip`).
104
+
- **`name`** - (**required**) platform name in the form of `VENDOR:ARCHITECTURE` (e.g., `arduino:avr`).
105
+
- **`source-path`** - path to install as a platform. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder.
106
+
- **Default**: root folder of the archive.
63
107
64
108
### `libraries`
65
109
66
-
YAML-format list of library dependencies to install.
110
+
[YAML](https://en.wikipedia.org/wiki/YAML)-format list of library dependencies to install.
67
111
68
-
Default `"- source-path: ./"`. This causes the repository to be installed as a library. If there are no library dependencies and you want to override the default, set the `libraries` input to an empty list (`- libraries: '-'`).
112
+
**Default**: `"- source-path: ./"`
113
+
This causes the repository to be installed as a library. If there are no library dependencies and you want to override the default, set the `libraries` input to an empty list (`- libraries: '-'`).
69
114
70
115
Libraries are installed under the Arduino user folder at `~/Arduino/libraries`.
71
116
72
-
Note: when the deprecated space-separated list format of this input is used, the repository under test will always be installed as a library.
117
+
**Note**: when the deprecated space-separated list format of this input is used, the repository under test will always be installed as a library.
73
118
74
-
#### Sources:
119
+
#### Supported library sources:
75
120
76
121
##### Library Manager
77
122
78
123
Keys:
79
-
- `name`- name of the library, as defined in the `name` field of its [library.properties](https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format) metadata file. The library will be installed to a folder matching the name, but with any spaces replaced by `_`.
80
-
- `version`- version of the library to install. Default is the latest version.
124
+
- **`name`** - (**required**) name of the library, as defined in the `name` field of its [library.properties](https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format) metadata file.
125
+
- **`version`** - version of the library to install.
126
+
- **Default**: the latest version.
127
+
128
+
**Notes**:
129
+
- The library will be installed to a folder matching its name, but with any spaces replaced by `_`.
130
+
- If the library's author defined dependencies, those libraries will be installed automatically.
81
131
82
132
##### Local path
83
133
84
134
Keys:
85
-
- `source-path`- path to install as a library. Relative paths are assumed to be relative to the root of the repository.
86
-
- `destination-name`- folder name to install the library to. By default, the folder will be named according to the source repository or subfolder name.
135
+
- **`source-path`** - (**required**) path to install as a library. Relative paths are assumed to be relative to the root of the repository.
136
+
- **`destination-name`** - folder name to install the library to.
137
+
- **Default**: the folder will be named according to the source repository or subfolder name.
87
138
88
139
##### Repository
89
140
90
141
Keys:
91
-
- `source-url`- URL to clone the repository from. It must start with `git://` or end with `.git`.
92
-
- `version`- [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) of the repository to checkout. The special version name `latest` will cause the latest tag to be used. By default, the repository will be checked out to the tip of the default branch.
93
-
- `source-path`- path to install as a library. Paths are relative to the root of the repository. The default is to install from the root of the repository.
94
-
- `destination-name`- folder name to install the library to. By default, the folder will be named according to the source repository or subfolder name.
142
+
- **`source-url`** - (**required**) URL to clone the repository from. It must start with `git://` or end with `.git`.
143
+
- **`version`** - [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) of the repository to checkout. The special version name `latest` will cause the latest tag to be used.
144
+
- **Default**: the tip of the default branch.
145
+
- **`source-path`** - path to install as a library. Paths are relative to the root of the repository.
146
+
- **Default**: root of the repository.
147
+
- **`destination-name`** - folder name to install the library to.
148
+
- **Default**: named according to the source repository or subfolder name.
95
149
96
150
##### Archive download
97
151
98
152
Keys:
99
-
- `source-url`- download URL for the archive (e.g., `https://github.com/arduino-libraries/Servo/archive/master.zip`).
100
-
- `source-path`- path to install as a library. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder. The default is to install from the root folder of the archive.
101
-
- `destination-name`- folder name to install the library to. By default, the folder will be named according to the source archive or subfolder name.
153
+
- **`source-url`** - (**required**) download URL for the archive (e.g., `https://github.com/arduino-libraries/Servo/archive/master.zip`).
154
+
- **`source-path`** - path to install as a library. Paths are relative to the root folder of the archive, or the root of the archive if it has no root folder.
155
+
- **Default**: root folder of the archive.
156
+
- **`destination-name`** - folder name to install the library to.
157
+
- **Default**: named according to the source archive or subfolder name.
102
158
103
159
### `sketch-paths`
104
160
105
-
YAML-format list of paths containing sketches to compile. These paths will be searched recursively. Default `- examples`.
161
+
[YAML](https://en.wikipedia.org/wiki/YAML)-format list of paths containing sketches to compile. These paths will be searched recursively.
162
+
163
+
**Default**: `"- examples"`
106
164
107
165
### `verbose`
108
166
109
-
Set to true to show verbose output in the log. Default `false`
167
+
Set to true to show verbose output in the log.
168
+
169
+
**Default**: `false`
110
170
111
171
### `sketches-report-path`
112
172
113
-
Path in which to save a JSON formatted file containing data from the sketch compilations. Should be used only to store reports. Relative paths are relative to [`GITHUB_WORKSPACE`](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables). The folder will be created if it doesn't already exist. This report is used by the `arduino/report-size-deltas` and `arduino/report-size-trends` actions. Default `"size-deltas-reports"`.
173
+
Path in which to save a JSON formatted file containing data from the sketch compilations. Should be used only to store reports. Relative paths are relative to [`GITHUB_WORKSPACE`](https://help.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables). The folder will be created if it doesn't already exist.
174
+
175
+
This report is used by the [`arduino/report-size-deltas`](https://github.com/arduino/report-size-deltas) and [`arduino/report-size-trends`](https://github.com/arduino/report-size-trends) actions.
176
+
177
+
**Default**: `"size-deltas-reports"`
114
178
115
179
### `github-token`
116
180
117
-
GitHub access token used to get information from the GitHub API. Only needed for private repositories with `enable-deltas-report` set to `true`. It will be convenient to use [`${{ secrets.GITHUB_TOKEN }}`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). Default `""`.
181
+
GitHub access token used to get information from the GitHub API. Only needed for private repositories with [`enable-deltas-report`](#enable-deltas-report) set to `true`. It will be convenient to use [`${{ secrets.GITHUB_TOKEN }}`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token).
182
+
183
+
**Default**: `""`
118
184
119
185
### `enable-deltas-report`
120
186
121
-
Set to `true` to cause the action to determine the change in memory usage and compiler warnings of the compiled sketches. If the workflow is triggered by a `pull_request` event, the comparison is between the pull request branch and the tip of the pull request's base branch. If the workflow is triggered by a `push` event, the comparison is between the pushed commit and its immediate parent. The deltas will be displayed in the GitHub Actions build log. This may be used with the [`arduino/report-size-deltas` action](https://github.com/arduino/report-size-deltas). Default `false`.
187
+
Set to `true` to cause the action to determine the change in memory usage and compiler warnings of the compiled sketches.
188
+
189
+
If the workflow is triggered by a [`pull_request` event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request), the comparison is between the pull request branch and the tip of the pull request's base branch.
190
+
191
+
If the workflow is triggered by a [`push` event](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#push), the comparison is between the pushed commit and its immediate parent.
192
+
193
+
The deltas will be displayed in the GitHub Actions build log.
194
+
195
+
This report may be used with the [`arduino/report-size-deltas` action](https://github.com/arduino/report-size-deltas).
196
+
197
+
**Default**: `false`
198
+
199
+
#### How it works
200
+
201
+
The sketch is first compiled with the repository in [`$GITHUB_WORKSPACE`](https://docs.github.com/en/actions/configuring-and-managing-workflows/using-environment-variables#default-environment-variables) at the state it was at before the action's step. Data from the compilation is recorded in the sketches report. Next, a [`git checkout`] to the [Git ref](https://git-scm.com/book/en/v2/Git-Internals-Git-References) used as the base of the comparison is done and the compilation + data recording process repeated. The delta is the change in the data between the two compilations.
202
+
203
+
Dependencies defined via the [`libraries`](#libraries) or [`platforms`](#platforms) inputs are installed via [symlinks](https://en.wikipedia.org/wiki/Symbolic_link), meaning dependencies from local paths under `$GITHUB_WORKSPACE` reflect the deltas checkouts even though they are installed outside `$GITHUB_WORKSPACE`.
122
204
123
205
### `enable-warnings-report`
124
206
125
-
Set to `true` to cause the action to record the compiler warning count for each sketch compilation in the sketches report. Default `false`.
207
+
Set to `true` to cause the action to record the compiler warning count for each sketch compilation in the sketches report.
208
+
209
+
**Default**: `false`
126
210
127
211
## Example usage
128
212
129
-
Only compiling examples:
130
213
```yaml
131
-
- uses: arduino/compile-sketches@master
214
+
- uses: arduino/compile-sketches@main
132
215
with:
133
216
fqbn: 'arduino:avr:uno'
134
217
libraries: |
135
218
- name: Servo
136
219
- name: Stepper
137
220
version: 1.1.3
138
221
```
139
-
140
-
Storing the sketches compilation report report as a [workflow artifact](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts):
0 commit comments