Skip to content

Commit

Permalink
Report changes in memory usage that would result from merging a PR
Browse files Browse the repository at this point in the history
On creation or commit to a pull request, a report of the resulting change in memory usage of the examples will be
commented to the PR thread.
  • Loading branch information
per1234 committed May 26, 2021
1 parent 05b7d7a commit 20dc2e5
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/compile-platform-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
name: ${{ matrix.board.fqbn }}
runs-on: ubuntu-latest

env:
SKETCHES_REPORTS_PATH: sketches-reports

strategy:
fail-fast: false

Expand Down Expand Up @@ -184,7 +187,6 @@ jobs:
- source-path: ./
name: arduino:avr
sketch-paths: |
- libraries
# Compile these sketches for all boards
- libraries/EEPROM/examples/eeprom_clear
- libraries/EEPROM/examples/eeprom_iteration
Expand All @@ -193,3 +195,12 @@ jobs:
# Board-specific sketches
${{ matrix.serial-sketch-paths }}
${{ matrix.softwareserial-sketch-paths }}
enable-deltas-report: true
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save sketches report as workflow artifact
uses: actions/upload-artifact@v2
with:
if-no-files-found: error
path: ${{ env.SKETCHES_REPORTS_PATH }}
name: ${{ 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:
# The name of the workflow artifact created by the sketch compilation workflow
sketches-reports-source: sketches-reports

0 comments on commit 20dc2e5

Please sign in to comment.