Skip to content

Commit ae799cb

Browse files
authored
Merge pull request #23 from per1234/public-ci
Switch to contributor-friendly approach to size deltas CI report
2 parents d75a20f + 1e3abab commit ae799cb

File tree

3 files changed

+31
-30
lines changed

3 files changed

+31
-30
lines changed

.github/workflows/compile-examples-private.yml renamed to .github/workflows/compile-examples.yml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ name: Compile Examples
44
on:
55
push:
66
paths:
7-
- ".github/workflows/compile-examples-private.ya?ml"
7+
- ".github/workflows/compile-examples.ya?ml"
88
- "library.properties"
99
- "examples/**"
1010
- "src/**"
1111
pull_request:
1212
paths:
13-
- ".github/workflows/compile-examples-private.ya?ml"
13+
- ".github/workflows/compile-examples.ya?ml"
1414
- "library.properties"
1515
- "examples/**"
1616
- "src/**"
@@ -20,15 +20,14 @@ on:
2020
workflow_dispatch:
2121
repository_dispatch:
2222

23-
env:
24-
SKETCHES_REPORTS_PATH: sketches-reports
25-
SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports
26-
2723
jobs:
2824
build:
2925
name: ${{ matrix.board.fqbn }}
3026
runs-on: ubuntu-latest
3127

28+
env:
29+
SKETCHES_REPORTS_PATH: sketches-reports
30+
3231
strategy:
3332
fail-fast: false
3433

@@ -63,26 +62,4 @@ jobs:
6362
with:
6463
if-no-files-found: error
6564
path: ${{ env.SKETCHES_REPORTS_PATH }}
66-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
67-
68-
report-size-deltas:
69-
needs: build
70-
# Run even if some compilations failed. Only run when there are write permissions.
71-
if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
72-
runs-on: ubuntu-latest
73-
74-
steps:
75-
- name: Download sketches reports artifact
76-
id: download-artifact
77-
continue-on-error: true # If compilation failed for all boards then there are no artifacts
78-
uses: actions/download-artifact@v2
79-
with:
80-
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
81-
path: ${{ env.SKETCHES_REPORTS_PATH }}
82-
83-
- name: Comment size deltas report to PR
84-
uses: arduino/report-size-deltas@v1
85-
# If actions/download-artifact failed, there are no artifacts to report from.
86-
if: steps.download-artifact.outcome == 'success'
87-
with:
88-
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
65+
name: ${{ env.SKETCHES_REPORTS_PATH }}
Lines changed: 24 additions & 0 deletions
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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Portenta Breakout Carrier Library for Arduino
22

33
[![Check Arduino status](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/check-arduino.yml)
4-
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/compile-examples-private.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/compile-examples-private.yml)
4+
[![Compile Examples status](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/compile-examples.yml)
55
[![Spell Check status](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_PortentaBreakoutLibrary/actions/workflows/spell-check.yml)
66

77
Arduino Library for the Arduino Portenta Breakout Carrier

0 commit comments

Comments
 (0)