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
Include the latest release of the script in your project by adding the following lines to your build configuration file:
13
13
```yaml
14
14
# Clone the script repository
@@ -21,7 +21,7 @@ Include the latest release of the script in your project by adding the following
21
21
- source "${HOME}/scripts/arduino-ci-script.sh"
22
22
```
23
23
24
-
##### Local copy
24
+
#### Local copy
25
25
If you're passing a token to the script's publish report functions then best security practices would be to use a static copy of the script so you can be sure of the commands the token is used with:
26
26
- Download the latest version of the script from https://github.com/per1234/arduino-ci-script/releases by clicking one of the **Source code** links.
27
27
- Unzip the downloaded file.
@@ -33,10 +33,11 @@ If you're passing a token to the script's publish report functions then best sec
33
33
Be sure to check for new releases of the script so that you can benefit from the ongoing development work. You can receive notifications of releases by [watching the repository](https://github.com/per1234/arduino-ci-script/subscription).
34
34
35
35
36
-
#### Usage
36
+
### Usage
37
37
See https://github.com/per1234/WatchdogLog/blob/master/.travis.yml for an example of the script in use.
38
38
39
39
Please configure your continuous integration system to make the minimum number of downloads and sketch verifications necessary to effectively test your code. This will prevent wasting Arduino and Travis CI's bandwidth and keep the build durations short.
Control the level of verbosity of the script's output in the Travis CI log. Verbose output can be helpful for debugging but in normal usage it makes the log hard to read and may cause the log to exceed Travis CI's maximum log size of 4 MB, which causes the job to be terminated. The default verbosity level is `0`.
42
43
- Parameter: **SCRIPT_VERBOSITY_LEVEL** - `0`, `1` or `2` (least to most verbosity).
@@ -185,11 +186,12 @@ Add the report to the report gist. See the [instructions for publishing job repo
185
186
- Parameter: **doLinkComment** - `true` or `false` Whether to comment on the GitHub thread of the commit that triggered the build with a link to the report.
186
187
187
188
188
-
#### Publishing job reports
189
+
### Publishing job reports
189
190
The script offers the option of publishing the job result reports to a repository or GitHub [gist](https://gist.github.com/) by using the `publish_report_to_repository` or `publish_report_to_gist` functions. This makes it easier to view the reports or to import them into a spreadsheet program. You also have the option of having the link to the reports automatically added in a comment to the commit that triggered the build. This requires some configuration, which is described in the instructions below.
190
191
191
192
NOTE: For security reasons, reports for builds of pull requests from a fork of the repository can not be published. If the owner of that fork wants to publish reports they can create a GitHub token (and gist if using `publish_report_to_gist`) and configure the Travis CI settings for their fork of the repository following these instructions.
192
-
##### Creating a GitHub personal access token
193
+
194
+
#### Creating a GitHub personal access token
193
195
This is required for either publishing option.
194
196
1. Sign in to your GitHub account.
195
197
2. Click your avatar at the top right corner of GitHub > **Settings** > **Developer settings** > **Personal access tokens** > **Generate new token**.
@@ -203,7 +205,8 @@ This is required for either publishing option.
203
205
9. Click the **Add** button.
204
206
205
207
An alternative to using a Travis CI hidden environment variable as described above is to define the GitHub personal access token as an encrypted environment variable: https://docs.travis-ci.com/user/environment-variables/#Encrypting-environment-variables.
206
-
##### Creating a gist
208
+
209
+
#### Creating a gist
207
210
This is required for use of the `publish_report_to_gist` function.
208
211
1. Open https://gist.github.com/
209
212
2. Sign in to your GitHub account.
@@ -216,9 +219,10 @@ This is required for use of the `publish_report_to_gist` function.
216
219
9. Click the **Add** button.
217
220
218
221
219
-
#### Troubleshooting
222
+
### Troubleshooting
220
223
##### Script hangs after an arduino command
221
224
The Arduino IDE will usually try to start the GUI whenever there is an error in the command. Since the Travis CI build environment does not support this it will just hang for ten minutes until Travis CI automatically cancels the job. This means you get no useful information on the cause of the problem.
225
+
222
226
##### Verbose output
223
227
Verbose output results in a harder to read log so you should leave it off or minimized when possible but it can be useful for troubleshooting. Note that turning on verbose output for a large build may cause the log to exceed 4 MB, which causes Travis CI to terminate the job.
224
228
- Verbose script output - See [`set_script_verbosity` documentation](set_script_verbosity-script_verbosity_level) in the Usage section.
@@ -228,6 +232,7 @@ Verbose output results in a harder to read log so you should leave it off or min
228
232
- `- set -o verbose`
229
233
- Print a trace of simple commands, for commands, case commands, select commands, and arithmetic for commands and their arguments or associated word lists after they are expanded and before they are executed. The value of the PS4 variable is expanded and the resultant value is printed before the command and its expanded arguments.
230
234
- `- set -o xtrace`
235
+
231
236
##### Problematic IDE versions
232
237
Some older versions of the Arduino IDE have bugs or limitations that may cause problems if used with this script:
233
238
- 1.5.1 and older - The command line interface was added in 1.5.2, thus no version older than that can be used.
@@ -239,5 +244,5 @@ Some older versions of the Arduino IDE have bugs or limitations that may cause p
239
244
- 1.6.3 and older - Do not support installing boards (`--install-boards`), thus `install_package` can't be used if no newer IDE version has been installed.
240
245
241
246
242
-
#### Contributing
247
+
### Contributing
243
248
Pull requests or issue reports are welcome! Please see the [contribution rules](https://github.com/per1234/arduino-ci-script/blob/master/CONTRIBUTING.md) for instructions.
0 commit comments