Skip to content

Commit 8c3c851

Browse files
authored
[CI] Add arduino/report-size-deltas action (#38)
This action comments on the pull request with a report on the resulting change in memory usage of the Arduino sketches compiled by the arduino/compile-sketches action.
1 parent b1f7e36 commit 8c3c851

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/compile-examples.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,59 +31,76 @@ jobs:
3131
- fqbn: arduino:samd:mkr1000
3232
platforms: |
3333
- name: arduino:samd
34+
artifact-name-suffix: arduino-samd-mkr1000
3435
- fqbn: arduino:samd:mkrzero
3536
platforms: |
3637
- name: arduino:samd
38+
artifact-name-suffix: arduino-samd-mkrzero
3739
- fqbn: arduino:samd:mkrwifi1010
3840
platforms: |
3941
- name: arduino:samd
42+
artifact-name-suffix: arduino-samd-mkrwifi1010
4043
- fqbn: arduino:samd:mkrfox1200
4144
platforms: |
4245
- name: arduino:samd
46+
artifact-name-suffix: arduino-samd-mkrfox1200
4347
- fqbn: arduino:samd:mkrwan1300
4448
platforms: |
4549
- name: arduino:samd
50+
artifact-name-suffix: arduino-samd-mkrwan1300
4651
- fqbn: arduino:samd:mkrwan1310
4752
platforms: |
4853
- name: arduino:samd
54+
artifact-name-suffix: arduino-samd-mkrwan1310
4955
- fqbn: arduino:samd:mkrgsm1400
5056
platforms: |
5157
- name: arduino:samd
58+
artifact-name-suffix: arduino-samd-mkrgsm1400
5259
- fqbn: arduino:samd:mkrnb1500
5360
platforms: |
5461
- name: arduino:samd
62+
artifact-name-suffix: arduino-samd-mkrnb1500
5563
- fqbn: arduino:samd:mkrvidor4000
5664
platforms: |
5765
- name: arduino:samd
66+
artifact-name-suffix: arduino-samd-mkrvidor4000
5867
- fqbn: arduino:mbed_portenta:envie_m7
5968
platforms: |
6069
- name: arduino:mbed_portenta
70+
artifact-name-suffix: arduino-mbed_portenta-envie_m7
6171
sketch-paths: |
6272
- examples/Interrupts_subclassing
6373
- fqbn: arduino:mbed_portenta:envie_m7:target_core=cm4
6474
platforms: |
6575
- name: arduino:mbed_portenta
76+
artifact-name-suffix: arduino-mbed_portenta-envie_m7-target_code-cm4
6677
sketch-paths: |
6778
- examples/Interrupts_subclassing
6879
- fqbn: arduino:mbed_nano:nano33ble
6980
platforms: |
7081
- name: arduino:mbed_nano
82+
artifact-name-suffix: arduino-mbed_nano-nano33ble
7183
sketch-paths: |
7284
- examples/Interrupts_subclassing
7385
- fqbn: arduino:mbed_nano:nanorp2040connect
7486
platforms: |
7587
- name: arduino:mbed_nano
88+
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
7689
- fqbn: arduino:mbed_edge:edge_control
7790
platforms: |
7891
- name: arduino:mbed_edge
92+
artifact-name-suffix: arduino-mbed_edge-edge_control
7993
- fqbn: esp32:esp32:esp32
8094
platforms: |
8195
- name: esp32:esp32
8296
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
97+
artifact-name-suffix: esp32-esp32-esp32
8398
- fqbn: rp2040:rp2040:rpipico
8499
platforms: |
85100
- name: rp2040:rp2040
86101
source-url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
102+
artifact-name-suffix: rp2040-rp2040-rpipico
103+
87104
steps:
88105
- name: Checkout
89106
uses: actions/checkout@v4
@@ -109,5 +126,5 @@ jobs:
109126
if: github.event_name == 'pull_request'
110127
uses: actions/upload-artifact@v4
111128
with:
112-
name: ${{ env.SKETCHES_REPORTS_PATH }}
129+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
113130
path: ${{ 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+
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
24+
sketches-reports-source: ^sketches-report-.+

0 commit comments

Comments
 (0)