Skip to content

Commit 76054b8

Browse files
authored
Fix regression re report-size-deltas after updating actions/upload-artifact. (#12)
For more information see https://github.com/arduino/report-size-deltas/blob/main/docs/FAQ.md#size-deltas-report-workflow-triggered-by-schedule-event .
1 parent a0a6e4c commit 76054b8

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

.github/workflows/compile-examples.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: Compile Examples
22

3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
34
on:
45
pull_request:
56
paths:
@@ -11,6 +12,11 @@ on:
1112
- ".github/workflows/compile-examples.yml"
1213
- "examples/**"
1314
- "src/**"
15+
schedule:
16+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms).
17+
- cron: "0 8 * * TUE"
18+
workflow_dispatch:
19+
repository_dispatch:
1420

1521
jobs:
1622
build:
@@ -38,13 +44,14 @@ jobs:
3844
- fqbn: arduino:mbed_nano:nanorp2040connect
3945
platforms: |
4046
- name: arduino:mbed_nano
47+
artifact-name-suffix: arduino-mbed_nano-nanorp2040connect
4148

4249
steps:
43-
- name: Checkout
50+
- name: Checkout repository
4451
uses: actions/checkout@v4
4552

4653
- name: Compile examples
47-
uses: arduino/compile-sketches@main
54+
uses: arduino/compile-sketches@v1
4855
with:
4956
fqbn: ${{ matrix.board.fqbn }}
5057
platforms: ${{ matrix.board.platforms }}
@@ -53,9 +60,9 @@ jobs:
5360
github-token: ${{ secrets.GITHUB_TOKEN }}
5461
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
5562

56-
- name: Save memory usage change report as artifact
57-
if: github.event_name == 'pull_request'
63+
- name: Save sketches report as workflow artifact
5864
uses: actions/upload-artifact@v4
5965
with:
60-
name: ${{ env.SKETCHES_REPORTS_PATH }}
66+
if-no-files-found: error
6167
path: ${{ env.SKETCHES_REPORTS_PATH }}
68+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
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)