From 8c1b0372f5e680629b32ebfeaceed77a56d79228 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Wed, 21 Feb 2024 07:11:39 +0100 Subject: [PATCH] Fix regression: report size delta size on PR. The necessary steps have in fact been documented here: https://github.com/arduino/report-size-deltas/blob/main/docs/FAQ.md#workflow-triggered-by-pull_request-event but I have overlooked them when I fixed the upload issue. With this PR the size deltas are - once again - reported within the PR. --- .github/workflows/compile-examples.yml | 21 +++++++++++++++++++-- .github/workflows/report-size-deltas.yml | 18 ------------------ .gitignore | 1 + 3 files changed, 20 insertions(+), 20 deletions(-) delete mode 100644 .github/workflows/report-size-deltas.yml create mode 100644 .gitignore diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index aae4de7..372b465 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -19,13 +19,15 @@ on: # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch workflow_dispatch: +env: + SKETCHES_REPORTS_PATH: sketches-reports + jobs: - build: + compile: name: ${{ matrix.board.fqbn }} runs-on: ubuntu-latest env: - SKETCHES_REPORTS_PATH: sketches-reports # Libraries to install for all boards UNIVERSAL_LIBRARIES: | # Install the ArduinoModbus library from the local path @@ -117,3 +119,18 @@ jobs: if-no-files-found: error name: sketches-report-${{ matrix.board.artifact-name-suffix }} path: ${{ env.SKETCHES_REPORTS_PATH }} + + 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 }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml deleted file mode 100644 index 6fce082..0000000 --- a/.github/workflows/report-size-deltas.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Report Size Deltas - -on: - schedule: - - cron: "*/5 * * * *" - # See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#workflow_dispatch - workflow_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 "Compile Examples" workflow - sketches-reports-source: sketches-reports diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f11b75 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/