From 77d9c80606886257549b94077279f70e2d91f3dd Mon Sep 17 00:00:00 2001 From: Ali Jahangiri <75624145+aliphys@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:37:58 +0100 Subject: [PATCH 1/3] ci: add sketch paths to UNIVERSAL_SKETCH_PATHS --- .github/workflows/compile-examples.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 950e0c3..ba866d4 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -24,9 +24,12 @@ on: env: UNIVERSAL_SKETCH_PATHS: | - extras/tests - - examples/SimpleStorageWriteRead - examples/AdvancedUSBInternalOperations - examples/BackupInternalPartitions + - examples/Callbacks + - examples/InternalStoragePartitioning + - examples/Logger + - examples/SimpleStorageWriteRead SKETCHES_REPORTS_PATH: sketches-reports SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports From 5b5ce45092c5adf6f2eb7f77489cd4f418c47f8b Mon Sep 17 00:00:00 2001 From: Ali Jahangiri <75624145+aliphys@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:18:30 +0100 Subject: [PATCH 2/3] ci: add build profiles for all exampes --- .../workflows/compile-examples-profiles.yml | 80 +++++++++++++++++++ .../AdvancedUSBInternalOperations/sketch.yaml | 31 +++++++ examples/BackupInternalPartitions/sketch.yaml | 31 +++++++ examples/Callbacks/sketch.yaml | 31 +++++++ .../InternalStoragePartitioning/sketch.yaml | 31 +++++++ examples/Logger/sketch.yaml | 31 +++++++ examples/SimpleStorageWriteRead/sketch.yaml | 31 +++++++ 7 files changed, 266 insertions(+) create mode 100644 .github/workflows/compile-examples-profiles.yml create mode 100644 examples/AdvancedUSBInternalOperations/sketch.yaml create mode 100644 examples/BackupInternalPartitions/sketch.yaml create mode 100644 examples/Callbacks/sketch.yaml create mode 100644 examples/InternalStoragePartitioning/sketch.yaml create mode 100644 examples/Logger/sketch.yaml create mode 100644 examples/SimpleStorageWriteRead/sketch.yaml diff --git a/.github/workflows/compile-examples-profiles.yml b/.github/workflows/compile-examples-profiles.yml new file mode 100644 index 0000000..cc954e0 --- /dev/null +++ b/.github/workflows/compile-examples-profiles.yml @@ -0,0 +1,80 @@ +# Source: https://github.com/per1234/.github/blob/main/workflow-templates/compile-examples-private.md +name: Compile Examples with Build Profiles + +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +on: + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by changes to external resources (libraries, platforms). + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +env: + UNIVERSAL_SKETCH_PATHS: | + - extras/tests + - examples/AdvancedUSBInternalOperations + - examples/BackupInternalPartitions + - examples/Callbacks + - examples/InternalStoragePartitioning + - examples/Logger + - examples/SimpleStorageWriteRead + SKETCHES_REPORTS_PATH: sketches-reports + SKETCHES_REPORTS_ARTIFACT_NAME: sketches-reports + +jobs: + build: + name: ${{ matrix.board.fqbn }} + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + + strategy: + fail-fast: false + + matrix: + board: + - fqbn: arduino:mbed_portenta:envie_m7 + platforms: | + - name: arduino:mbed_portenta + artifact-name-suffix: arduino-mbed_portenta-envie_m7 + - fqbn: arduino:renesas_portenta:portenta_c33 + platforms: | + - name: arduino:renesas_portenta + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 + - fqbn: arduino:mbed_opta:opta + platforms: | + - name: arduino:mbed_opta + artifact-name-suffix: arduino-mbed_opta-opta + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Compile examples + uses: arduino/compile-sketches@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + cli-compile-flags: --profile ${{ matrix.board.fqbn }} + fqbn: ${{ matrix.board.fqbn }} + platforms: ${{ matrix.board.platforms }} + libraries: | + # Install the library from the local path. + - source-path: ./ + - name: Arduino_USBHostMbed5 + - name: Arduino_POSIXStorage + - name: ArduinoRS485 + # Additional library dependencies can be listed here. + # See: https://github.com/arduino/compile-sketches#libraries + sketch-paths: | + ${{ env.UNIVERSAL_SKETCH_PATHS }} + ${{ matrix.board.additional-sketch-paths }} + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + + - name: Save sketches report as workflow artifact + uses: actions/upload-artifact@v4 + with: + if-no-files-found: error + name: sketches-report-${{ matrix.board.artifact-name-suffix }} + path: ${{ env.SKETCHES_REPORTS_PATH }} diff --git a/examples/AdvancedUSBInternalOperations/sketch.yaml b/examples/AdvancedUSBInternalOperations/sketch.yaml new file mode 100644 index 0000000..be9cbd0 --- /dev/null +++ b/examples/AdvancedUSBInternalOperations/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + arduino:mbed_portenta:envie_m7: + notes: Portenta H7 family & Portenta Machine Control + fqbn: arduino:mbed_portenta:envie_m7 + platforms: + - platform: arduino:mbed_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:renesas_portenta:portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - platform: arduino:renesas_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:mbed_opta:opta: + notes: Portenta Opta + fqbn: arduino:mbed_opta:opta + platforms: + - platform: arduino:mbed_opta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) \ No newline at end of file diff --git a/examples/BackupInternalPartitions/sketch.yaml b/examples/BackupInternalPartitions/sketch.yaml new file mode 100644 index 0000000..be9cbd0 --- /dev/null +++ b/examples/BackupInternalPartitions/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + arduino:mbed_portenta:envie_m7: + notes: Portenta H7 family & Portenta Machine Control + fqbn: arduino:mbed_portenta:envie_m7 + platforms: + - platform: arduino:mbed_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:renesas_portenta:portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - platform: arduino:renesas_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:mbed_opta:opta: + notes: Portenta Opta + fqbn: arduino:mbed_opta:opta + platforms: + - platform: arduino:mbed_opta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) \ No newline at end of file diff --git a/examples/Callbacks/sketch.yaml b/examples/Callbacks/sketch.yaml new file mode 100644 index 0000000..be9cbd0 --- /dev/null +++ b/examples/Callbacks/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + arduino:mbed_portenta:envie_m7: + notes: Portenta H7 family & Portenta Machine Control + fqbn: arduino:mbed_portenta:envie_m7 + platforms: + - platform: arduino:mbed_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:renesas_portenta:portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - platform: arduino:renesas_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:mbed_opta:opta: + notes: Portenta Opta + fqbn: arduino:mbed_opta:opta + platforms: + - platform: arduino:mbed_opta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) \ No newline at end of file diff --git a/examples/InternalStoragePartitioning/sketch.yaml b/examples/InternalStoragePartitioning/sketch.yaml new file mode 100644 index 0000000..be9cbd0 --- /dev/null +++ b/examples/InternalStoragePartitioning/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + arduino:mbed_portenta:envie_m7: + notes: Portenta H7 family & Portenta Machine Control + fqbn: arduino:mbed_portenta:envie_m7 + platforms: + - platform: arduino:mbed_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:renesas_portenta:portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - platform: arduino:renesas_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:mbed_opta:opta: + notes: Portenta Opta + fqbn: arduino:mbed_opta:opta + platforms: + - platform: arduino:mbed_opta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) \ No newline at end of file diff --git a/examples/Logger/sketch.yaml b/examples/Logger/sketch.yaml new file mode 100644 index 0000000..be9cbd0 --- /dev/null +++ b/examples/Logger/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + arduino:mbed_portenta:envie_m7: + notes: Portenta H7 family & Portenta Machine Control + fqbn: arduino:mbed_portenta:envie_m7 + platforms: + - platform: arduino:mbed_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:renesas_portenta:portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - platform: arduino:renesas_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:mbed_opta:opta: + notes: Portenta Opta + fqbn: arduino:mbed_opta:opta + platforms: + - platform: arduino:mbed_opta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) \ No newline at end of file diff --git a/examples/SimpleStorageWriteRead/sketch.yaml b/examples/SimpleStorageWriteRead/sketch.yaml new file mode 100644 index 0000000..be9cbd0 --- /dev/null +++ b/examples/SimpleStorageWriteRead/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + arduino:mbed_portenta:envie_m7: + notes: Portenta H7 family & Portenta Machine Control + fqbn: arduino:mbed_portenta:envie_m7 + platforms: + - platform: arduino:mbed_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:renesas_portenta:portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - platform: arduino:renesas_portenta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) + arduino:mbed_opta:opta: + notes: Portenta Opta + fqbn: arduino:mbed_opta:opta + platforms: + - platform: arduino:mbed_opta (4.1.1) + libraries: + - Arduino_USBHostMbed5 (0.3.1) + - Arduino_POSIXStorage (1.2.0) + - Arduino_UnifiedStorage (1.1.0) + - ArduinoRS485 (1.0.5) \ No newline at end of file From 060783a443cf67ddb123e309a7ba3b0dc85fb694 Mon Sep 17 00:00:00 2001 From: Ali Jahangiri <75624145+aliphys@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:33:39 +0100 Subject: [PATCH 3/3] ci: correct `mbed_portenta` version --- .github/workflows/compile-examples-profiles.yml | 10 ---------- examples/AdvancedUSBInternalOperations/sketch.yaml | 4 ++-- examples/BackupInternalPartitions/sketch.yaml | 4 ++-- examples/Callbacks/sketch.yaml | 4 ++-- examples/InternalStoragePartitioning/sketch.yaml | 4 ++-- examples/Logger/sketch.yaml | 4 ++-- examples/SimpleStorageWriteRead/sketch.yaml | 4 ++-- 7 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/compile-examples-profiles.yml b/.github/workflows/compile-examples-profiles.yml index cc954e0..c8c0d48 100644 --- a/.github/workflows/compile-examples-profiles.yml +++ b/.github/workflows/compile-examples-profiles.yml @@ -56,16 +56,6 @@ jobs: with: github-token: ${{ secrets.GITHUB_TOKEN }} cli-compile-flags: --profile ${{ matrix.board.fqbn }} - fqbn: ${{ matrix.board.fqbn }} - platforms: ${{ matrix.board.platforms }} - libraries: | - # Install the library from the local path. - - source-path: ./ - - name: Arduino_USBHostMbed5 - - name: Arduino_POSIXStorage - - name: ArduinoRS485 - # Additional library dependencies can be listed here. - # See: https://github.com/arduino/compile-sketches#libraries sketch-paths: | ${{ env.UNIVERSAL_SKETCH_PATHS }} ${{ matrix.board.additional-sketch-paths }} diff --git a/examples/AdvancedUSBInternalOperations/sketch.yaml b/examples/AdvancedUSBInternalOperations/sketch.yaml index be9cbd0..4f09a49 100644 --- a/examples/AdvancedUSBInternalOperations/sketch.yaml +++ b/examples/AdvancedUSBInternalOperations/sketch.yaml @@ -13,14 +13,14 @@ profiles: notes: Portenta C33 fqbn: arduino:renesas_portenta:portenta_c33 platforms: - - platform: arduino:renesas_portenta (4.1.1) + - platform: arduino:renesas_portenta (1.0.5) libraries: - Arduino_USBHostMbed5 (0.3.1) - Arduino_POSIXStorage (1.2.0) - Arduino_UnifiedStorage (1.1.0) - ArduinoRS485 (1.0.5) arduino:mbed_opta:opta: - notes: Portenta Opta + notes: Portenta Opta family fqbn: arduino:mbed_opta:opta platforms: - platform: arduino:mbed_opta (4.1.1) diff --git a/examples/BackupInternalPartitions/sketch.yaml b/examples/BackupInternalPartitions/sketch.yaml index be9cbd0..4f09a49 100644 --- a/examples/BackupInternalPartitions/sketch.yaml +++ b/examples/BackupInternalPartitions/sketch.yaml @@ -13,14 +13,14 @@ profiles: notes: Portenta C33 fqbn: arduino:renesas_portenta:portenta_c33 platforms: - - platform: arduino:renesas_portenta (4.1.1) + - platform: arduino:renesas_portenta (1.0.5) libraries: - Arduino_USBHostMbed5 (0.3.1) - Arduino_POSIXStorage (1.2.0) - Arduino_UnifiedStorage (1.1.0) - ArduinoRS485 (1.0.5) arduino:mbed_opta:opta: - notes: Portenta Opta + notes: Portenta Opta family fqbn: arduino:mbed_opta:opta platforms: - platform: arduino:mbed_opta (4.1.1) diff --git a/examples/Callbacks/sketch.yaml b/examples/Callbacks/sketch.yaml index be9cbd0..4f09a49 100644 --- a/examples/Callbacks/sketch.yaml +++ b/examples/Callbacks/sketch.yaml @@ -13,14 +13,14 @@ profiles: notes: Portenta C33 fqbn: arduino:renesas_portenta:portenta_c33 platforms: - - platform: arduino:renesas_portenta (4.1.1) + - platform: arduino:renesas_portenta (1.0.5) libraries: - Arduino_USBHostMbed5 (0.3.1) - Arduino_POSIXStorage (1.2.0) - Arduino_UnifiedStorage (1.1.0) - ArduinoRS485 (1.0.5) arduino:mbed_opta:opta: - notes: Portenta Opta + notes: Portenta Opta family fqbn: arduino:mbed_opta:opta platforms: - platform: arduino:mbed_opta (4.1.1) diff --git a/examples/InternalStoragePartitioning/sketch.yaml b/examples/InternalStoragePartitioning/sketch.yaml index be9cbd0..4f09a49 100644 --- a/examples/InternalStoragePartitioning/sketch.yaml +++ b/examples/InternalStoragePartitioning/sketch.yaml @@ -13,14 +13,14 @@ profiles: notes: Portenta C33 fqbn: arduino:renesas_portenta:portenta_c33 platforms: - - platform: arduino:renesas_portenta (4.1.1) + - platform: arduino:renesas_portenta (1.0.5) libraries: - Arduino_USBHostMbed5 (0.3.1) - Arduino_POSIXStorage (1.2.0) - Arduino_UnifiedStorage (1.1.0) - ArduinoRS485 (1.0.5) arduino:mbed_opta:opta: - notes: Portenta Opta + notes: Portenta Opta family fqbn: arduino:mbed_opta:opta platforms: - platform: arduino:mbed_opta (4.1.1) diff --git a/examples/Logger/sketch.yaml b/examples/Logger/sketch.yaml index be9cbd0..4f09a49 100644 --- a/examples/Logger/sketch.yaml +++ b/examples/Logger/sketch.yaml @@ -13,14 +13,14 @@ profiles: notes: Portenta C33 fqbn: arduino:renesas_portenta:portenta_c33 platforms: - - platform: arduino:renesas_portenta (4.1.1) + - platform: arduino:renesas_portenta (1.0.5) libraries: - Arduino_USBHostMbed5 (0.3.1) - Arduino_POSIXStorage (1.2.0) - Arduino_UnifiedStorage (1.1.0) - ArduinoRS485 (1.0.5) arduino:mbed_opta:opta: - notes: Portenta Opta + notes: Portenta Opta family fqbn: arduino:mbed_opta:opta platforms: - platform: arduino:mbed_opta (4.1.1) diff --git a/examples/SimpleStorageWriteRead/sketch.yaml b/examples/SimpleStorageWriteRead/sketch.yaml index be9cbd0..4f09a49 100644 --- a/examples/SimpleStorageWriteRead/sketch.yaml +++ b/examples/SimpleStorageWriteRead/sketch.yaml @@ -13,14 +13,14 @@ profiles: notes: Portenta C33 fqbn: arduino:renesas_portenta:portenta_c33 platforms: - - platform: arduino:renesas_portenta (4.1.1) + - platform: arduino:renesas_portenta (1.0.5) libraries: - Arduino_USBHostMbed5 (0.3.1) - Arduino_POSIXStorage (1.2.0) - Arduino_UnifiedStorage (1.1.0) - ArduinoRS485 (1.0.5) arduino:mbed_opta:opta: - notes: Portenta Opta + notes: Portenta Opta family fqbn: arduino:mbed_opta:opta platforms: - platform: arduino:mbed_opta (4.1.1)