Skip to content

Commit 4814aa3

Browse files
committed
Report changes in memory usage that would result from merging a PR
On creation or commit to a pull request, a report of the resulting change in memory usage of the examples will be commented to the PR thread.
1 parent edbcf2a commit 4814aa3

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

.github/workflows/compile-examples.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
build:
2525
runs-on: ubuntu-latest
2626

27+
env:
28+
SKETCHES_REPORTS_PATH: sketches-reports
29+
2730
strategy:
2831
fail-fast: false
2932

@@ -56,3 +59,11 @@ jobs:
5659
# See: https://github.com/arduino/compile-sketches#libraries
5760
sketch-paths: |
5861
- ./examples/
62+
enable-deltas-report: true
63+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
64+
65+
- name: Save memory usage change report as artifact
66+
uses: actions/upload-artifact@v2
67+
with:
68+
name: ${{ env.SKETCHES_REPORTS_PATH }}
69+
path: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Report Size Deltas
2+
3+
on:
4+
schedule:
5+
- cron: '*/5 * * * *'
6+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
7+
workflow_dispatch:
8+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
9+
repository_dispatch:
10+
11+
jobs:
12+
report:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md
17+
- name: Comment size deltas reports to PRs
18+
uses: arduino/report-size-deltas@main
19+
with:
20+
# The name of the workflow artifact created by the "Compile Examples" workflow
21+
sketches-reports-source: sketches-reports

0 commit comments

Comments
 (0)