|
13 | 13 | - "src/**"
|
14 | 14 |
|
15 | 15 | jobs:
|
16 |
| - build: |
| 16 | + compile: |
17 | 17 | runs-on: ubuntu-latest
|
18 | 18 |
|
19 | 19 | env:
|
@@ -283,18 +283,28 @@ jobs:
|
283 | 283 | enable-deltas-report: "true"
|
284 | 284 | sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
|
285 | 285 |
|
286 |
| - - name: Write data to size trends report spreadsheet |
287 |
| - # Update report on every push to the master branch |
288 |
| - if: github.event_name == 'push' && github.ref == 'refs/heads/master' |
289 |
| - uses: arduino/report-size-trends@main |
290 |
| - with: |
291 |
| - sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} |
292 |
| - google-key-file: ${{ secrets.GOOGLE_KEY_FILE }} |
293 |
| - spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4 |
294 |
| - |
| 286 | + # This step is needed to pass the size data to the report job. |
295 | 287 | - name: Save memory usage change report as artifact
|
296 | 288 | if: github.event_name == 'pull_request'
|
297 | 289 | uses: actions/upload-artifact@v4
|
298 | 290 | with:
|
299 | 291 | name: sketches-report-${{ matrix.board.artifact-name-suffix }}
|
300 | 292 | path: ${{ env.SKETCHES_REPORTS_PATH }}
|
| 293 | + |
| 294 | + # When using a matrix to compile for multiple boards, it's necessary to use a separate job for the deltas report |
| 295 | + report: |
| 296 | + needs: compile # Wait for the compile job to finish to get the data for the report |
| 297 | + if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request |
| 298 | + runs-on: ubuntu-latest |
| 299 | + |
| 300 | + steps: |
| 301 | + # This step is needed to get the size data produced by the compile jobs |
| 302 | + - name: Download sketches reports artifacts |
| 303 | + uses: actions/download-artifact@v4 |
| 304 | + with: |
| 305 | + # All workflow artifacts will be downloaded to this location. |
| 306 | + path: ${{ env.SKETCHES_REPORTS_PATH }} |
| 307 | + |
| 308 | + - uses: arduino/report-size-deltas@v1 |
| 309 | + with: |
| 310 | + sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }} |
0 commit comments