Skip to content

Commit 00ff506

Browse files
authored
Merge pull request #64 from arduino-libraries/fix-compile-examples
Fix size deltas report infrastructure configuration
2 parents b26acea + 2e0fa45 commit 00ff506

File tree

2 files changed

+25
-23
lines changed

2 files changed

+25
-23
lines changed

.github/workflows/compile-examples.yml

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ on:
2020
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
2121
repository_dispatch:
2222

23-
env:
24-
# It's convenient to set variables for values used multiple times in the workflow.
25-
SKETCHES_REPORTS_PATH: sketches-reports
26-
2723
jobs:
28-
compile:
24+
build:
2925
runs-on: ubuntu-latest
3026

27+
env:
28+
SKETCHES_REPORTS_PATH: sketches-reports
29+
3130
strategy:
3231
fail-fast: false
3332

@@ -84,21 +83,3 @@ jobs:
8483
with:
8584
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
8685
path: ${{ env.SKETCHES_REPORTS_PATH }}
87-
88-
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
89-
report:
90-
needs: compile # Wait for the compile job to finish to get the data for the report
91-
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
92-
runs-on: ubuntu-latest
93-
94-
steps:
95-
# This step is needed to get the size data produced by the compile jobs
96-
- name: Download sketches reports artifacts
97-
uses: actions/download-artifact@v4
98-
with:
99-
# All workflow artifacts will be downloaded to this location.
100-
path: ${{ env.SKETCHES_REPORTS_PATH }}
101-
102-
- uses: arduino/report-size-deltas@v1
103-
with:
104-
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Report Size Deltas
2+
3+
on:
4+
schedule:
5+
- cron: '*/5 * * * *'
6+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch
7+
workflow_dispatch:
8+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
9+
repository_dispatch:
10+
11+
jobs:
12+
report:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# See: https://github.com/arduino/actions/blob/master/libraries/report-size-deltas/README.md
17+
- name: Comment size deltas reports to PRs
18+
uses: arduino/report-size-deltas@main
19+
with:
20+
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
21+
sketches-reports-source: ^sketches-report-.+

0 commit comments

Comments
 (0)