From 916580c042ac8b7baeb3b56fe69d5f963e46785c Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 16 Apr 2020 03:30:32 -0700 Subject: [PATCH] Report memory usage change caused by PRs On every push to a pull request, the change in memory usage of examples/utility/ArduinoIoTCloud_Travis_CI between the PR's head and base branch for each of the boards in the board matrix will be: - Shown in the log - Saved to a workflow artifact - Commented to the PR's thread as a table (after a delay of ~7 minutes max.) --- .github/workflows/compile-examples.yml | 9 +++++++++ .github/workflows/report-size-deltas.yml | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .github/workflows/report-size-deltas.yml diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index c3f9903cb..523e1eaba 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -48,3 +48,12 @@ jobs: fqbn: ${{ matrix.board.fqbn }} libraries: "${{ env.UNIVERSAL_LIBRARIES }} ${{ env[format('{0}{1}', matrix.board.type, '_LIBRARIES')] }}" sketch-paths: "${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ env[format('{0}{1}', matrix.board.type, '_SKETCH_PATHS')] }}" + size-report-sketch: 'ArduinoIoTCloud_Travis_CI' + enable-size-deltas-report: 'true' + + - name: Save memory usage change report as artifact + if: github.event_name == 'pull_request' + uses: actions/upload-artifact@v1 + with: + name: 'size-deltas-reports' + path: 'size-deltas-reports' diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml new file mode 100644 index 000000000..d56f8db19 --- /dev/null +++ b/.github/workflows/report-size-deltas.yml @@ -0,0 +1,11 @@ +on: + schedule: + - cron: '*/5 * * * *' + +jobs: + report: + runs-on: ubuntu-latest + + steps: + - name: Comment size deltas reports to PRs + uses: arduino/actions/libraries/report-size-deltas@master