Skip to content

Commit 665e3d9

Browse files
authored
Merge pull request #430 from per1234/fix-compile-examples
Fix size deltas report infrastructure configuration
2 parents 836771a + ce9fc41 commit 665e3d9

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

.github/workflows/compile-examples.yml

+2-24
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ on:
1212
- "examples/**"
1313
- "src/**"
1414

15-
env:
16-
# It's convenient to set variables for values used multiple times in the workflow.
17-
SKETCHES_REPORTS_PATH: sketches-reports
18-
1915
jobs:
20-
compile:
16+
build:
2117
runs-on: ubuntu-latest
2218

2319
env:
@@ -35,6 +31,7 @@ jobs:
3531
- examples/ArduinoIoTCloud-Callbacks
3632
- examples/ArduinoIoTCloud-Schedule
3733
- examples/utility/ArduinoIoTCloud_Travis_CI
34+
SKETCHES_REPORTS_PATH: sketches-reports
3835

3936
strategy:
4037
fail-fast: false
@@ -295,28 +292,9 @@ jobs:
295292
google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
296293
spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4
297294

298-
# This step is needed to pass the size data to the report job.
299295
- name: Save memory usage change report as artifact
300296
if: github.event_name == 'pull_request'
301297
uses: actions/upload-artifact@v4
302298
with:
303299
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
304300
path: ${{ env.SKETCHES_REPORTS_PATH }}
305-
306-
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
307-
report:
308-
needs: compile # Wait for the compile job to finish to get the data for the report
309-
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
310-
runs-on: ubuntu-latest
311-
312-
steps:
313-
# This step is needed to get the size data produced by the compile jobs
314-
- name: Download sketches reports artifacts
315-
uses: actions/download-artifact@v4
316-
with:
317-
# All workflow artifacts will be downloaded to this location.
318-
path: ${{ env.SKETCHES_REPORTS_PATH }}
319-
320-
- uses: arduino/report-size-deltas@v1
321-
with:
322-
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
schedule:
3+
- cron: '*/5 * * * *'
4+
5+
jobs:
6+
report:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Comment size deltas reports to PRs
11+
uses: arduino/report-size-deltas@v1
12+
with:
13+
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
14+
sketches-reports-source: ^sketches-report-.+

0 commit comments

Comments
 (0)