Skip to content

Commit 04804e0

Browse files
authored
Merge pull request #52 from arduino-libraries/fix-compile-examples
Fix size deltas report infrastructure configuration
2 parents 92e8561 + 8fee9fa commit 04804e0

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

.github/workflows/compile-examples.yml

+1-19
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
repository_dispatch:
2020

2121
jobs:
22-
compile:
22+
build:
2323
name: ${{ matrix.board.fqbn }}
2424
runs-on: ubuntu-latest
2525

@@ -101,21 +101,3 @@ jobs:
101101
if-no-files-found: error
102102
path: ${{ env.SKETCHES_REPORTS_PATH }}
103103
name: sketches-report-${{ matrix.board.artifact-name-suffix }}
104-
105-
# When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report
106-
report:
107-
needs: compile # Wait for the compile job to finish to get the data for the report
108-
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
109-
runs-on: ubuntu-latest
110-
111-
steps:
112-
# This step is needed to get the size data produced by the compile jobs
113-
- name: Download sketches reports artifacts
114-
uses: actions/download-artifact@v4
115-
with:
116-
# All workflow artifacts will be downloaded to this location.
117-
path: ${{ env.SKETCHES_REPORTS_PATH }}
118-
119-
- uses: arduino/report-size-deltas@v1
120-
with:
121-
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
+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-.+

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.idea/
1+
.idea/

0 commit comments

Comments
 (0)