From 18fb8b9603ee689ae706a019bc36e686fdf7ee7d Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 19 Mar 2024 14:24:40 +0100 Subject: [PATCH 01/11] Fix warning: backslash and newline separated by space --- src/SecureElementConfig.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SecureElementConfig.h b/src/SecureElementConfig.h index bbc7805..b60315e 100644 --- a/src/SecureElementConfig.h +++ b/src/SecureElementConfig.h @@ -12,7 +12,7 @@ #define SECURE_ELEMENT_CONFIG_H_ #if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \ - defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ + defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) || \ defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) || \ defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_OPTA) || \ From 792bf69ad2a2db2abde47ecb1f83d38e7e785ca4 Mon Sep 17 00:00:00 2001 From: pennam Date: Thu, 28 Mar 2024 10:58:26 +0100 Subject: [PATCH 02/11] SElementArduinoCloudCertificate read: suppress unused variable warning --- src/utility/SElementArduinoCloudCertificate.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utility/SElementArduinoCloudCertificate.cpp b/src/utility/SElementArduinoCloudCertificate.cpp index 0478aa1..e44ccd2 100644 --- a/src/utility/SElementArduinoCloudCertificate.cpp +++ b/src/utility/SElementArduinoCloudCertificate.cpp @@ -39,6 +39,7 @@ int SElementArduinoCloudCertificate::write(SecureElement & se, ECP256Certificate int SElementArduinoCloudCertificate::read(SecureElement & se, ECP256Certificate & cert, const SElementArduinoCloudSlot certSlot, const SElementArduinoCloudSlot keySlot) { #if defined(SECURE_ELEMENT_IS_SE050) || defined(SECURE_ELEMENT_IS_SOFTSE) + (void)keySlot; byte derBuffer[SE_CERT_BUFFER_LENGTH]; size_t derLen; if (!se.readSlot(static_cast(certSlot), derBuffer, sizeof(derBuffer))) { From d2d1981f6dbb32fd408702d968da861aa7965bf4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 08:45:53 +0000 Subject: [PATCH 03/11] Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/compile-examples.yml | 2 +- .github/workflows/sync-labels.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 6362f9c..3ee0bca 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -134,7 +134,7 @@ jobs: sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} - name: Save memory usage change report as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.SKETCHES_REPORTS_PATH }} if-no-files-found: error diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index 59ec78c..bb7505b 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -70,7 +70,7 @@ jobs: file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }} - name: Pass configuration files to next job via workflow artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: path: | *.yaml From d07fce58514c605d63392e356e7a6ea83b8abd6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:40:17 +0000 Subject: [PATCH 04/11] Bump actions/download-artifact from 3 to 4 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/sync-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index bb7505b..d3b9fe4 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -108,7 +108,7 @@ jobs: uses: actions/checkout@v4 - name: Download configuration files artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} path: ${{ env.CONFIGURATIONS_FOLDER }} From 550164eb02e6de4b19c8e3fdebb5f39ebdad34aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Mar 2024 00:10:25 +0000 Subject: [PATCH 05/11] Bump geekyeggo/delete-artifact from 2 to 5 Bumps [geekyeggo/delete-artifact](https://github.com/geekyeggo/delete-artifact) from 2 to 5. - [Release notes](https://github.com/geekyeggo/delete-artifact/releases) - [Changelog](https://github.com/GeekyEggo/delete-artifact/blob/main/CHANGELOG.md) - [Commits](https://github.com/geekyeggo/delete-artifact/compare/v2...v5) --- updated-dependencies: - dependency-name: geekyeggo/delete-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/sync-labels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index d3b9fe4..f4dcb37 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -114,7 +114,7 @@ jobs: path: ${{ env.CONFIGURATIONS_FOLDER }} - name: Remove unneeded artifact - uses: geekyeggo/delete-artifact@v2 + uses: geekyeggo/delete-artifact@v5 with: name: ${{ env.CONFIGURATIONS_ARTIFACT }} From 1cb79791fd91bd89ab49e48d36a3e6bda240245b Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 9 Oct 2024 03:00:36 -0700 Subject: [PATCH 06/11] Don't upload multiple times to same artifact in label sync workflow The "Sync Labels" GitHub Actions workflow is configured to allow the use of multiple shared label configuration files. This is done by using a job matrix in the GitHub Actions workflow to download each of the files from the source repository in a parallel GitHub Actions workflow job. A GitHub Actions workflow artifact was used to transfer the generated files between sequential jobs in the workflow. The "actions/upload-artifact" and "actions/download-artifact" actions are used for this purpose. Previously, a single artifact was used for the transfer of all the shared label configuration files, with each of the parallel jobs uploading its own generated files to that artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now necessary to use a dedicated artifact for each of the builds. These can be downloaded in aggregate by using the artifact name globbing and merging features which were introduced in version 4.1.0 of the "actions/download-artifact" action. --- .github/workflows/sync-labels.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml index f4dcb37..c65f6d8 100644 --- a/.github/workflows/sync-labels.yml +++ b/.github/workflows/sync-labels.yml @@ -19,7 +19,7 @@ on: env: CONFIGURATIONS_FOLDER: .github/label-configuration-files - CONFIGURATIONS_ARTIFACT: label-configuration-files + CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file- jobs: check: @@ -76,7 +76,7 @@ jobs: *.yaml *.yml if-no-files-found: error - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }} sync: needs: download @@ -107,16 +107,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 - - name: Download configuration files artifact + - name: Download configuration file artifacts uses: actions/download-artifact@v4 with: - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + merge-multiple: true + pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* path: ${{ env.CONFIGURATIONS_FOLDER }} - - name: Remove unneeded artifact + - name: Remove unneeded artifacts uses: geekyeggo/delete-artifact@v5 with: - name: ${{ env.CONFIGURATIONS_ARTIFACT }} + name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}* - name: Merge label configuration files run: | From 8693c9ccd3981139c09327ee39b785c9af31e6ca Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 9 Oct 2024 03:04:44 -0700 Subject: [PATCH 07/11] Don't upload multiple times to same artifact in sketch compilation workflow The "Compile Examples" GitHub Actions workflow is configured to compile the example sketches for each of the supported boards. This is done by using a job matrix in the GitHub Actions workflow to generate a parallel job for each board. A GitHub Actions workflow artifact is used to transfer the sketches report files generated by the "arduino/compile-sketches" action between this workflow's job and the "Report Size Deltas" workflow that uses the "arduino/report-size-deltas" action to publish the data. The "actions/upload-artifact" action is used to upload the sketches report files to the workflow artifact. Previously, the sketches reports from all the boards were uploaded to a single artifact. However, support for uploading multiple times to a single artifact was dropped in version 4.0.0 of the "actions/upload-artifact" action. So it is now necessary for each of the jobs to use a separate artifact. The "arduino/report-size-deltas" action is configured to recognize these multiple artifacts by a regular expression that matches against a standardized prefix on the artifact names. --- .github/workflows/compile-examples.yml | 14 +++++++++++++- .github/workflows/report-size-deltas.yml | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 3ee0bca..8804cf0 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -36,28 +36,40 @@ jobs: matrix: board: - fqbn: "arduino:samd:mkr1000" + artifact-name-suffix: arduino-samd-mkr1000 platform-name: arduino:samd - fqbn: "arduino:samd:mkrwifi1010" + artifact-name-suffix: arduino-samd-mkrwifi1010 platform-name: arduino:samd - fqbn: "arduino:samd:nano_33_iot" + artifact-name-suffix: arduino-samd-nano_33_iot platform-name: arduino:samd - fqbn: "arduino:samd:mkrgsm1400" + artifact-name-suffix: arduino-samd-mkrgsm1400 platform-name: arduino:samd - fqbn: "arduino:samd:mkrnb1500" + artifact-name-suffix: arduino-samd-mkrnb1500 platform-name: arduino:samd - fqbn: "arduino:mbed_portenta:envie_m7" + artifact-name-suffix: arduino-mbed_portenta-envie_m7 platform-name: arduino:mbed_portenta - fqbn: arduino:mbed_nano:nanorp2040connect + artifact-name-suffix: arduino-mbed_nano-nanorp2040connect platform-name: arduino:mbed_nano - fqbn: arduino:mbed_nicla:nicla_vision + artifact-name-suffix: arduino-mbed_nicla-nicla_vision platform-name: arduino:mbed_nicla - fqbn: arduino:mbed_opta:opta + artifact-name-suffix: arduino-mbed_opta-opta platform-name: arduino:mbed_opta - fqbn: arduino:mbed_giga:giga + artifact-name-suffix: arduino-mbed_giga-giga platform-name: arduino:mbed_giga - fqbn: arduino:renesas_portenta:portenta_c33 + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 platform-name: arduino:renesas_portenta - fqbn: arduino:renesas_uno:unor4wifi + artifact-name-suffix: arduino-renesas_uno-unor4wifi platform-name: arduino:renesas_uno include: @@ -136,6 +148,6 @@ jobs: - name: Save memory usage change report as artifact uses: actions/upload-artifact@v4 with: - name: ${{ env.SKETCHES_REPORTS_PATH }} + name: sketches-report-${{ matrix.board.artifact-name-suffix }} if-no-files-found: error path: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/.github/workflows/report-size-deltas.yml b/.github/workflows/report-size-deltas.yml index 5b6e9a6..b672ab0 100644 --- a/.github/workflows/report-size-deltas.yml +++ b/.github/workflows/report-size-deltas.yml @@ -20,5 +20,5 @@ jobs: - name: Comment size deltas reports to PRs uses: arduino/report-size-deltas@v1 with: - # The name of the workflow artifact created by the "Compile Examples" workflow - sketches-reports-source: sketches-reports + # Regex matching the names of the workflow artifacts created by the "Compile Examples" workflow + sketches-reports-source: ^sketches-report-.+ From c5f4583277cc2aba0da15f9bf038a54770e9d5c9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 00:32:37 +0000 Subject: [PATCH 08/11] Bump arduino/arduino-lint-action from 1 to 2 Bumps [arduino/arduino-lint-action](https://github.com/arduino/arduino-lint-action) from 1 to 2. - [Release notes](https://github.com/arduino/arduino-lint-action/releases) - [Commits](https://github.com/arduino/arduino-lint-action/compare/v1...v2) --- updated-dependencies: - dependency-name: arduino/arduino-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/arduino-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index bebb3cb..b6114a1 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v4 - name: Arduino Lint - uses: arduino/arduino-lint-action@v1 + uses: arduino/arduino-lint-action@v2 with: official: true library-manager: update From 3d2a8db7b7160bd5eb2b7d7ed36d73fcbb80f846 Mon Sep 17 00:00:00 2001 From: pennam Date: Mon, 2 Dec 2024 12:57:01 +0100 Subject: [PATCH 09/11] Add support for MKRWAN --- src/SecureElementConfig.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/SecureElementConfig.h b/src/SecureElementConfig.h index b60315e..12815d0 100644 --- a/src/SecureElementConfig.h +++ b/src/SecureElementConfig.h @@ -11,11 +11,12 @@ #ifndef SECURE_ELEMENT_CONFIG_H_ #define SECURE_ELEMENT_CONFIG_H_ -#if defined(ARDUINO_AVR_UNO_WIFI_REV2) || \ - defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || \ - defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) || \ - defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) || \ - defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_OPTA) || \ +#if defined(ARDUINO_AVR_UNO_WIFI_REV2) ||\ + defined(ARDUINO_SAMD_MKRWAN1300) || defined(ARDUINO_SAMD_MKRWAN1310) ||\ + defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) ||\ + defined(ARDUINO_SAMD_MKRGSM1400) || defined(ARDUINO_SAMD_MKR1000) ||\ + defined(ARDUINO_SAMD_MKRNB1500) || defined(ARDUINO_PORTENTA_H7_M7) ||\ + defined(ARDUINO_NANO_RP2040_CONNECT) || defined(ARDUINO_OPTA) ||\ defined(ARDUINO_GIGA) #define SECURE_ELEMENT_IS_ECCX08 #endif From 720f90e1a9b6e630cde6f473682e5d7860f22901 Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 3 Dec 2024 08:45:38 +0100 Subject: [PATCH 10/11] ci: add mkrwan --- .github/workflows/compile-examples.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 8804cf0..9b5d917 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -44,6 +44,9 @@ jobs: - fqbn: "arduino:samd:nano_33_iot" artifact-name-suffix: arduino-samd-nano_33_iot platform-name: arduino:samd + - fqbn: arduino:samd:mkrwan1300 + artifact-name-suffix: arduino-samd-mkrwan1300 + platform-name: arduino:samd - fqbn: "arduino:samd:mkrgsm1400" artifact-name-suffix: arduino-samd-mkrgsm1400 platform-name: arduino:samd From 1db5eb2444a086a22d33df23a54c5c988b727e5f Mon Sep 17 00:00:00 2001 From: pennam Date: Tue, 3 Dec 2024 08:59:25 +0100 Subject: [PATCH 11/11] Release v0.1.3 --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 31d2ed2..4f0437e 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=Arduino_SecureElement -version=0.1.2 +version=0.1.3 author=Arduino maintainer=Arduino sentence=Arduino Library for the Atmel/Microchip ECC508 and ECC608 and NXP SE050 crypto chips