Skip to content

Commit 3cbadf6

Browse files
authored
Fix regression re report-size-deltas after updating actions/upload-artifact. (#36)
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 d767f03 commit 3cbadf6

File tree

2 files changed

+28
-25
lines changed

2 files changed

+28
-25
lines changed

Diff for: .github/workflows/compile-examples.yml

+4-25
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@ jobs:
4646
- fqbn: arduino:mbed_portenta:envie_m7
4747
platforms: |
4848
- name: arduino:mbed_portenta
49+
artifact-name-suffix: arduino-mbed_portenta-envie_m7
4950
- fqbn: arduino:renesas_portenta:portenta_c33
5051
platforms: |
5152
- name: arduino:renesas_portenta
53+
artifact-name-suffix: arduino-renesas_portenta-portenta_c33
5254
- fqbn: arduino:mbed_opta:opta
5355
platforms: |
5456
- name: arduino:mbed_opta
57+
artifact-name-suffix: arduino-mbed_opta-opta
5558

5659
steps:
5760
- name: Checkout repository
@@ -81,29 +84,5 @@ jobs:
8184
uses: actions/upload-artifact@v3
8285
with:
8386
if-no-files-found: error
87+
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
8488
path: ${{ env.SKETCHES_REPORTS_PATH }}
85-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
86-
87-
report-size-deltas:
88-
needs: build
89-
# Run even if some compilations failed.
90-
if: always() && github.event_name == 'pull_request'
91-
runs-on: ubuntu-latest
92-
permissions:
93-
pull-requests: write
94-
95-
steps:
96-
- name: Download sketches reports artifact
97-
id: download-artifact
98-
continue-on-error: true # If compilation failed for all boards then there are no artifacts
99-
uses: actions/download-artifact@v4
100-
with:
101-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
102-
path: ${{ env.SKETCHES_REPORTS_PATH }}
103-
104-
- name: Comment size deltas report to PR
105-
uses: arduino/report-size-deltas@v1
106-
# If actions/download-artifact failed, there are no artifacts to report from.
107-
if: steps.download-artifact.outcome == 'success'
108-
with:
109-
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}

Diff for: .github/workflows/report-size-deltas.yml

+24
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)