From cdd2dd666a7deaa2ba9dab5df2c86c6c4dd70335 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 17 Oct 2021 03:49:47 -0700 Subject: [PATCH] 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 --- .github/workflows/compile-examples.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 2beed1f3..bd7849e2 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -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 @@ -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