From b1aa83d9ba6911529ed3a6a27adefd0633bc9733 Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 16 Nov 2020 05:07:23 -0800 Subject: [PATCH 1/3] Use sketch compilation CI actions from their new dedicated repositories The "smoke test" sketch compilation and reporting actions have been moved to dedicated repositories. The actions hosted at the old `arduino/actions/libraries/*` location will no longer be maintained. Since the time the actions were migrated to the dedicated repositories, a breaking change was made to the default value of the `sketches-report-path` input, which required a change to the values of the `name` and `path` inputs of the `actions/upload-artifact` action. --- .github/workflows/compile-examples.yml | 9 +++++---- .github/workflows/report-size-deltas.yml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 1652f6774..b00fd948f 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -28,6 +28,7 @@ jobs: UNIVERSAL_SKETCH_PATHS: '"examples/ArduinoIoTCloud-Advanced" "examples/ArduinoIoTCloud-Basic" "examples/utility/ArduinoIoTCloud_Travis_CI"' ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API + SKETCHES_REPORTS_PATH: sketches-reports strategy: fail-fast: false @@ -159,7 +160,7 @@ jobs: mv "${{ env.ARDUINOCORE_API_STAGING_PATH }}/api" "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino" - name: Compile examples - uses: arduino/actions/libraries/compile-examples@master + uses: arduino/compile-sketches@main with: platforms: ${{ matrix.platforms }} fqbn: ${{ matrix.board.fqbn }} @@ -173,7 +174,7 @@ jobs: - name: Write data to size trends report spreadsheet # Update report on every push to the master branch if: github.event_name == 'push' && github.ref == 'refs/heads/master' - uses: arduino/actions/libraries/report-size-trends@master + uses: arduino/report-size-trends@main with: google-key-file: ${{ secrets.GOOGLE_KEY_FILE }} spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4 @@ -182,5 +183,5 @@ jobs: if: github.event_name == 'pull_request' uses: actions/upload-artifact@v1 with: - name: 'size-deltas-reports' - path: 'size-deltas-reports' + name: ${{ env.SKETCHES_REPORTS_PATH }} + path: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index d56f8db19..798924b12 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -8,4 +8,4 @@ jobs: steps: - name: Comment size deltas reports to PRs - uses: arduino/actions/libraries/report-size-deltas@master + uses: arduino/report-size-deltas@main From 1a5021d4c68693d8613111741612e5539c5e4a1f Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 16 Nov 2020 05:09:33 -0800 Subject: [PATCH 2/3] Specify sketches report input values for sketch compilation CI actions The reliance on the `actions/upload-artifacts` action means that these values will always be hardcoded into the workflow. The result is that if the default values of the inputs are changed, it breaks the workflow, even if the changes are synchronized. So it's safest to not rely on the defaults. --- .github/workflows/compile-examples.yml | 2 ++ .github/workflows/report-size-deltas.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index b00fd948f..ed03cc51f 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -170,12 +170,14 @@ jobs: sketch-paths: "${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.sketch-paths }}" size-report-sketch: 'ArduinoIoTCloud_Travis_CI' enable-size-deltas-report: 'true' + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Write data to size trends report spreadsheet # Update report on every push to the master branch if: github.event_name == 'push' && github.ref == 'refs/heads/master' uses: arduino/report-size-trends@main with: + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} google-key-file: ${{ secrets.GOOGLE_KEY_FILE }} spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4 diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index 798924b12..12c162fa4 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -9,3 +9,6 @@ jobs: steps: - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@main + with: + # The name of the workflow artifact created by the "Compile Examples" workflow + sketches-reports-source: sketches-reports From c90fd6b23ee1fe16983d675aa692678713f3273c Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 16 Nov 2020 05:20:33 -0800 Subject: [PATCH 3/3] Use modern API of `arduino/compile-sketches` CI action Since the time the "Compile Examples" workflow was written, some improvements have been made to the API of the `arduino/compile-sketches` CI action. The previous API is still supported, but is deprecated and warnings are displayed in the workflow run log about this, which could result in confusion for contributors. --- .github/workflows/compile-examples.yml | 28 +++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index ed03cc51f..28e48bb07 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -25,7 +25,10 @@ jobs: - name: Arduino_DebugUtils - name: ArduinoMqttClient # sketch paths to compile (recursive) for all boards - UNIVERSAL_SKETCH_PATHS: '"examples/ArduinoIoTCloud-Advanced" "examples/ArduinoIoTCloud-Basic" "examples/utility/ArduinoIoTCloud_Travis_CI"' + UNIVERSAL_SKETCH_PATHS: | + - examples/ArduinoIoTCloud-Advanced + - examples/ArduinoIoTCloud-Basic + - examples/utility/ArduinoIoTCloud_Travis_CI ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API SKETCHES_REPORTS_PATH: sketches-reports @@ -58,7 +61,8 @@ jobs: - name: ArduinoECCX08 - name: RTCZero - name: WiFi101 - sketch-paths: '"examples/utility/Provisioning"' + sketch-paths: | + - examples/utility/Provisioning # MKR WiFi 1010, Nano 33 IoT - board: type: "nina" @@ -71,7 +75,9 @@ jobs: - name: WiFiNINA - name: Arduino_JSON - name: ArduinoBearSSL - sketch-paths: '"examples/utility/Provisioning" "examples/utility/SelfProvisioning"' + sketch-paths: | + - examples/utility/Provisioning + - examples/utility/SelfProvisioning # LoRaWAN boards - board: type: "wan" @@ -91,7 +97,8 @@ jobs: - name: ArduinoECCX08 - name: RTCZero - name: MKRGSM - sketch-paths: '"examples/utility/Provisioning"' + sketch-paths: | + - examples/utility/Provisioning # NB boards - board: type: "nb" @@ -101,7 +108,8 @@ jobs: - name: ArduinoECCX08 - name: RTCZero - name: MKRNB - sketch-paths: '"examples/utility/Provisioning"' + sketch-paths: | + - examples/utility/Provisioning # Portenta - board: type: "mbed" @@ -113,7 +121,8 @@ jobs: name: arduino:mbed libraries: | - name: ArduinoECCX08 - sketch-paths: '"examples/utility/Provisioning"' + sketch-paths: | + - examples/utility/Provisioning # ESP8266 boards - board: type: "esp8266" @@ -167,9 +176,10 @@ jobs: libraries: | ${{ env.UNIVERSAL_LIBRARIES }} ${{ matrix.libraries }} - sketch-paths: "${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.sketch-paths }}" - size-report-sketch: 'ArduinoIoTCloud_Travis_CI' - enable-size-deltas-report: 'true' + sketch-paths: | + ${{ env.UNIVERSAL_SKETCH_PATHS }} + ${{ matrix.sketch-paths }} + enable-deltas-report: 'true' sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Write data to size trends report spreadsheet