Skip to content

Commit c83d474

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 325b018 commit c83d474

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/workflows/compile-examples.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
push:
66
paths:
77
- ".github/workflows/compile-examples.yml"
8+
- "library.properties"
89
- "examples/**"
910
- "src/**"
1011
pull_request:
1112
paths:
1213
- ".github/workflows/compile-examples.yml"
14+
- "library.properties"
1315
- "examples/**"
1416
- "src/**"
1517
schedule:
@@ -23,6 +25,10 @@ jobs:
2325
name: ${{ matrix.board.fqbn }}
2426
runs-on: ubuntu-latest
2527

28+
env:
29+
BUILT_IN_EXAMPLES_PATH: extras/arduino-examples
30+
SKETCHES_REPORTS_PATH: sketches-reports
31+
2632
strategy:
2733
fail-fast: false
2834

@@ -76,3 +82,12 @@ jobs:
7682
# See: https://github.com/arduino/compile-sketches#libraries
7783
sketch-paths: |
7884
- ${{ env.BUILT_IN_EXAMPLES_PATH }}/examples/09.USB/Mouse
85+
enable-deltas-report: true
86+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
87+
88+
- name: Save sketches report as workflow artifact
89+
uses: actions/upload-artifact@v2
90+
with:
91+
if-no-files-found: error
92+
path: ${{ env.SKETCHES_REPORTS_PATH }}
93+
name: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Report Size Deltas
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/report-size-deltas.yml"
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+
jobs:
17+
report:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Comment size deltas reports to PRs
21+
uses: arduino/report-size-deltas@v1
22+
with:
23+
# The name of the workflow artifact created by the sketch compilation workflow
24+
sketches-reports-source: sketches-reports

0 commit comments

Comments
 (0)