Skip to content

Commit 6ec0ef4

Browse files
committed
Make size deltas report even when some compilations failed
The GitHub Actions workflow job that does a "smoke test" compilation of the library example sketches is a matrix, running a parallel job for each of the boards in the array. It may be that one job passes and another fails. In this case, there is memory usage change data available for the board that passed compilation. Previously the size deltas report only happened if all compilations passed. It may be useful for the contributor to get the size deltas feedback in addition to the compilation results even when one of the boards did not pass compilation so that they may have as much of the available information as possible to work with.
1 parent e8667d5 commit 6ec0ef4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/compile-examples.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,20 @@ jobs:
108108

109109
report-size-deltas:
110110
needs: compile-test
111-
if: github.event_name == 'pull_request'
111+
# Run even if some compilations failed.
112+
if: always() && github.event_name == 'pull_request'
112113
runs-on: ubuntu-latest
113114
steps:
114115
- name: Download sketches reports artifact
116+
id: download-artifact
117+
continue-on-error: true # If compilation failed for all boards then there are no artifacts
115118
uses: actions/download-artifact@v2
116119
with:
117120
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
118121
path: ${{ env.SKETCHES_REPORTS_PATH }}
119122

120123
- uses: arduino/report-size-deltas@main
124+
# If actions/download-artifact failed, there are no artifacts to report from.
125+
if: steps.download-artifact.outcome == 'success'
121126
with:
122127
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}

0 commit comments

Comments
 (0)