Skip to content

Commit facf192

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 916d890 commit facf192

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/compile-examples.yml

+12
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
name: ${{ matrix.board.fqbn }}
2929
runs-on: ubuntu-latest
3030

31+
env:
32+
SKETCHES_REPORTS_PATH: sketches-reports
33+
3134
strategy:
3235
fail-fast: false
3336

@@ -61,3 +64,12 @@ jobs:
6164
# See: https://github.com/arduino/compile-sketches#libraries
6265
sketch-paths: |
6366
- examples
67+
enable-deltas-report: true
68+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
69+
70+
- name: Save sketches report as workflow artifact
71+
uses: actions/upload-artifact@v3
72+
with:
73+
if-no-files-found: error
74+
path: ${{ env.SKETCHES_REPORTS_PATH }}
75+
name: ${{ env.SKETCHES_REPORTS_PATH }}
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Report Size Deltas
2+
3+
# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/report-size-deltas.ya?ml"
8+
schedule:
9+
# Run at the minimum interval allowed by GitHub Actions.
10+
# Note: GitHub Actions periodically has outages which result in workflow failures.
11+
# In this event, the workflows will start passing again once the service recovers.
12+
- cron: "*/5 * * * *"
13+
workflow_dispatch:
14+
repository_dispatch:
15+
16+
permissions:
17+
pull-requests: write
18+
19+
jobs:
20+
report:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Comment size deltas reports to PRs
24+
uses: arduino/report-size-deltas@v1
25+
with:
26+
# The name of the workflow artifact created by the sketch compilation workflow
27+
sketches-reports-source: sketches-reports

0 commit comments

Comments
 (0)