Skip to content

Commit 8e2a3c6

Browse files
authored
Merge pull request #16 from per1234/non-scheduled-deltas-report
Use the Compile Examples workflow for the deltas report
2 parents 9aab1ae + 30c000b commit 8e2a3c6

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

.github/workflows/compile-examples.yml

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

15+
env:
16+
SKETCHES_REPORTS_PATH: sketches-reports
17+
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
18+
1519
jobs:
1620
compile-test:
1721
runs-on: ubuntu-latest
@@ -87,11 +91,29 @@ jobs:
8791
sketch-paths: |
8892
${{ env.UNIVERSAL_SKETCH_PATHS }}
8993
enable-deltas-report: 'true'
94+
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
95+
github-token: ${{ secrets.GITHUB_TOKEN }}
9096
verbose: 'true'
9197

9298
- name: Save memory usage change report as artifact
9399
if: github.event_name == 'pull_request'
94100
uses: actions/upload-artifact@v2
95101
with:
96-
name: 'size-deltas-reports'
97-
path: 'size-deltas-reports'
102+
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
103+
path: ${{ env.SKETCHES_REPORTS_PATH }}
104+
105+
report-size-deltas:
106+
needs: compile-test
107+
# Only run the job when the workflow is triggered by a pull request from this repository (because arduino/report-size-deltas requires write permissions)
108+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
109+
runs-on: ubuntu-latest
110+
steps:
111+
- name: Download sketches reports artifact
112+
uses: actions/download-artifact@v2
113+
with:
114+
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
115+
path: ${{ env.SKETCHES_REPORTS_PATH }}
116+
117+
- uses: arduino/report-size-deltas@main
118+
with:
119+
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}

.github/workflows/report-size-deltas.yml

-13
This file was deleted.

0 commit comments

Comments
 (0)