diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index d3f3a88..f38f005 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -46,12 +46,15 @@ jobs: - fqbn: arduino:mbed_portenta:envie_m7 platforms: | - name: arduino:mbed_portenta + artifact-name-suffix: arduino-mbed_portenta-envie_m7 - fqbn: arduino:renesas_portenta:portenta_c33 platforms: | - name: arduino:renesas_portenta + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 - fqbn: arduino:mbed_opta:opta platforms: | - name: arduino:mbed_opta + artifact-name-suffix: arduino-mbed_opta-opta steps: - name: Checkout repository @@ -81,29 +84,5 @@ jobs: uses: actions/upload-artifact@v3 with: if-no-files-found: error + name: sketches-report-${{ matrix.board.artifact-name-suffix }} path: ${{ env.SKETCHES_REPORTS_PATH }} - name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} - - report-size-deltas: - needs: build - # Run even if some compilations failed. - if: always() && github.event_name == 'pull_request' - runs-on: ubuntu-latest - permissions: - pull-requests: write - - steps: - - name: Download sketches reports artifact - id: download-artifact - continue-on-error: true # If compilation failed for all boards then there are no artifacts - uses: actions/download-artifact@v4 - with: - name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }} - path: ${{ env.SKETCHES_REPORTS_PATH }} - - - name: Comment size deltas report to PR - uses: arduino/report-size-deltas@v1 - # If actions/download-artifact failed, there are no artifacts to report from. - if: steps.download-artifact.outcome == 'success' - with: - sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml new file mode 100644 index 0000000..39e2a0a --- /dev/null +++ b/.github/workflows/report-size-deltas.yml @@ -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-.+