Skip to content

Commit cdd2dd6

Browse files
committed
Use modern API of arduino/compile-sketches action
The API of the `arduino/compile-sketches` GitHub Actions action used to compile the library's example sketches in the "Compile Examples" CI workflow has evolved over time. Although measures were taken to provide backwards compatibility for the old API, it turns out that the GitHub Actions behavior of creating environment variables for arbitrary input names relied upon for still recognizing the old inputs is not consistent across action types. It works fine for the Docker container action type originally used by `arduino/compile-sketches`, but not for the new "Composite Run Steps" action type we switched to. This change resulted in sketch data deltas no longer being generated due to the workflow's use of the unsupported input name `enable-size-deltas-report` (which was changed to the more appropriate `enable-deltas-report` last year). This resulted in failed runs of the "Report Size Deltas" due to the reports not having the required deltas data. The fix is simply to update to the new input name in the "Compile Examples" GitHub Actions workflow that uses the `arduino/compile-sketches` action. I also updated the contents of the action's `libraries` input to the new YAML array style. This was not mandatory because there is still backwards compatibility for the old API in this case due to the input name not having changed, but only the data format. However, the old data format is deprecated so it's safest to update. I also removed the no longer used `size-report-sketch` input. This input was removed at the time the action was changed to report on all compilations
1 parent 5cca5c1 commit cdd2dd6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/compile-examples.yml

+10-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@ jobs:
2525
runs-on: ubuntu-latest
2626

2727
env:
28-
LIBRARIES: Arduino_DebugUtils WiFi101 WiFiNINA MKRGSM MKRNB MKRWAN
28+
LIBRARIES: |
29+
# Install the Arduino_ConnectionHandler library from the repository
30+
- source-path: ./
31+
- name: Arduino_DebugUtils
32+
- name: WiFi101
33+
- name: WiFiNINA
34+
- name: MKRGSM
35+
- name: MKRNB
36+
- name: MKRWAN
2937
ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed
3038
ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API
3139
SKETCHES_REPORTS_PATH: sketches-reports
@@ -123,8 +131,7 @@ jobs:
123131
platforms: ${{ matrix.platforms }}
124132
fqbn: ${{ matrix.board.fqbn }}
125133
libraries: ${{ env.LIBRARIES }}
126-
size-report-sketch: 'ConnectionHandlerDemo'
127-
enable-size-deltas-report: 'true'
134+
enable-deltas-report: 'true'
128135
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
129136

130137
- name: Save memory usage change report as artifact

0 commit comments

Comments
 (0)