Skip to content
This repository was archived by the owner on Feb 28, 2024. It is now read-only.

Commit 7e94dc9

Browse files
authored
Merge pull request #63 from per1234/update-ci
Switch to contributor-friendly approach to size deltas CI report
2 parents 6f544ef + 4afbece commit 7e94dc9

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

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

-21
Original file line numberDiff line numberDiff line change
@@ -53,24 +53,3 @@ jobs:
5353
if-no-files-found: error
5454
path: ${{ env.SKETCHES_REPORTS_PATH }}
5555
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
56-
57-
report:
58-
needs: compile-examples
59-
# Only run the job when the workflow is triggered by a pull request from this repository (because arduino/report-size-deltas requires write permissions)
60-
if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
61-
runs-on: ubuntu-latest
62-
steps:
63-
- name: Download sketches reports artifact
64-
id: download-artifact
65-
continue-on-error: true # If compilation failed for all boards then there are no artifacts
66-
uses: actions/download-artifact@v2
67-
with:
68-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
69-
path: ${{ env.SKETCHES_REPORTS_PATH }}
70-
71-
- name: Comment size deltas report to PR
72-
uses: arduino/report-size-deltas@v1
73-
# If actions/download-artifact failed, there are no artifacts to report from.
74-
if: steps.download-artifact.outcome == 'success'
75-
with:
76-
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/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/report-size-deltas.ya?ml"
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+
# The name of the workflow artifact created by the sketch compilation workflow
24+
sketches-reports-source: sketches-reports

0 commit comments

Comments
 (0)