|
1 |
| -# arduino/report-size-deltas action |
| 1 | +# `arduino/report-size-deltas` action |
| 2 | + |
| 3 | +[](https://github.com/arduino/report-size-deltas/actions?workflow=libraries/report-size-deltas+workflow) |
| 4 | +[](https://github.com/arduino/report-size-deltas/actions?workflow=Spell+Check) |
| 5 | +[](https://codecov.io/gh/arduino/report-size-deltas) |
2 | 6 |
|
3 | 7 | This action comments on the pull request with a report on the resulting change in memory usage of the [Arduino](https://www.arduino.cc/) sketches compiled by the [`arduino/compile-sketches`](https://github.com/arduino/compile-sketches) action. This should be run from a [scheduled workflow](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule).
|
4 | 8 |
|
5 | 9 | ## Inputs
|
6 | 10 |
|
7 | 11 | ### `size-deltas-reports-artifact-name`
|
8 | 12 |
|
9 |
| -Name of the workflow artifact that contains the memory usage data, as specified to the [`actions/upload-artifact`](https://github.com/actions/upload-artifact) action via its `name` input. Default "size-deltas-reports". |
| 13 | +Name of the [workflow artifact](https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts) that contains the memory usage data, as specified to the [`actions/upload-artifact`](https://github.com/actions/upload-artifact) action via its `name` input. |
| 14 | + |
| 15 | +**Default**: `"size-deltas-reports"` |
10 | 16 |
|
11 | 17 | ### `github-token`
|
12 | 18 |
|
13 |
| -GitHub access token used to comment the memory usage comparison results to the PR thread. Default [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). |
| 19 | +[GitHub access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) used to comment the memory usage comparison results to the PR thread. |
| 20 | + |
| 21 | +**Default**: [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) |
14 | 22 |
|
15 | 23 | ## Example usage
|
16 | 24 |
|
|
22 | 30 | build:
|
23 | 31 | runs-on: ubuntu-latest
|
24 | 32 | steps:
|
25 |
| - - uses: arduino/report-size-deltas@master |
| 33 | + - uses: arduino/report-size-deltas@main |
| 34 | +``` |
| 35 | +
|
| 36 | +This must be used in conjunction with a workflow that runs the [`arduino/compile-sketches`](https://github.com/arduino/compile-sketches) action and uploads the resulting sketches report to a [workflow artifact](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts): |
| 37 | +```yaml |
| 38 | +on: [push, pull_request] |
| 39 | +jobs: |
| 40 | + compile: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v2 |
| 44 | + - uses: arduino/compile-sketches@main |
| 45 | + with: |
| 46 | + enable-deltas-report: true |
| 47 | + - uses: actions/upload-artifact@v2 |
| 48 | + with: |
| 49 | + name: size-deltas-reports |
| 50 | + path: size-deltas-reports |
26 | 51 | ```
|
0 commit comments