Skip to content

Commit

Permalink
Merge pull request #102 from arduino-libraries/fix-compile-examples
Browse files Browse the repository at this point in the history
Fix size deltas report infrastructure configuration
  • Loading branch information
aentinger committed Feb 21, 2024
2 parents f55722d + c319dca commit 3cc51ff
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ on:
workflow_dispatch:
repository_dispatch:

env:
SKETCHES_REPORTS_PATH: sketches-reports

jobs:
compile:
build:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false

Expand Down Expand Up @@ -128,18 +128,3 @@ jobs:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: sketches-report-${{ matrix.board.artifact-name-suffix }}

report:
needs: compile
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest

steps:
- name: Download sketches reports artifacts
uses: actions/download-artifact@v4
with:
path: ${{ env.SKETCHES_REPORTS_PATH }}

- uses: arduino/report-size-deltas@v1
with:
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
24 changes: 24 additions & 0 deletions .github/workflows/report-size-deltas.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Report Size Deltas

# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
on:
push:
paths:
- ".github/workflows/report-size-deltas.yml"
schedule:
# Run at the minimum interval allowed by GitHub Actions.
# Note: GitHub Actions periodically has outages which result in workflow failures.
# In this event, the workflows will start passing again once the service recovers.
- cron: "*/5 * * * *"
workflow_dispatch:
repository_dispatch:

jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Comment size deltas reports to PRs
uses: arduino/report-size-deltas@v1
with:
# Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow
sketches-reports-source: ^sketches-report-.+

0 comments on commit 3cc51ff

Please sign in to comment.