Skip to content

Use modern API of arduino/compile-sketches action #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
  • Loading branch information
per1234 committed Oct 17, 2021
commit cdd2dd666a7deaa2ba9dab5df2c86c6c4dd70335
13 changes: 10 additions & 3 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ jobs:
runs-on: ubuntu-latest

env:
LIBRARIES: Arduino_DebugUtils WiFi101 WiFiNINA MKRGSM MKRNB MKRWAN
LIBRARIES: |
# Install the Arduino_ConnectionHandler library from the repository
- source-path: ./
- name: Arduino_DebugUtils
- name: WiFi101
- name: WiFiNINA
- name: MKRGSM
- name: MKRNB
- name: MKRWAN
ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed
ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API
SKETCHES_REPORTS_PATH: sketches-reports
Expand Down Expand Up @@ -123,8 +131,7 @@ jobs:
platforms: ${{ matrix.platforms }}
fqbn: ${{ matrix.board.fqbn }}
libraries: ${{ env.LIBRARIES }}
size-report-sketch: 'ConnectionHandlerDemo'
enable-size-deltas-report: 'true'
enable-deltas-report: 'true'
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}

- name: Save memory usage change report as artifact
Expand Down