diff --git a/.github/workflows/compile-examples-profiles.yml b/.github/workflows/compile-examples-profiles.yml new file mode 100644 index 0000000..9392a84 --- /dev/null +++ b/.github/workflows/compile-examples-profiles.yml @@ -0,0 +1,64 @@ +# 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: + 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: + - name: envie_m7 + fqbn: arduino:mbed_portenta:envie_m7 + platforms: | + - name: arduino:mbed_portenta + artifact-name-suffix: arduino-mbed_portenta-envie_m7 + - name: portenta_c33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: | + - name: arduino:renesas_portenta + artifact-name-suffix: arduino-renesas_portenta-portenta_c33 + - name: opta + 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 }} + enable-deltas-report: true + sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }} + cli-compile-flags: | + - --profile=${{ matrix.board.name }} + fqbn: ${{ matrix.board.fqbn }} + + - 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/.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 diff --git a/README.md b/README.md index 27c22dd..6cb85f2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 💾 Unified Storage Library -[![Check Arduino](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/check-arduino.yml) [![Compile Examples](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/compile-examples.yml) [![Spell Check](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/spell-check.yml) [![Sync Labels](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/sync-labels.yml) +[![Check Arduino](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/check-arduino.yml) [![Compile Examples](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/compile-examples.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/compile-examples.yml) [![Compile Examples with Build Profiles](https://github.com/aliphys/Arduino_UnifiedStorage/actions/workflows/compile-examples-profiles.yml/badge.svg)](https://github.com/aliphys/Arduino_UnifiedStorage/actions/workflows/compile-examples-profiles.yml) [![Spell Check](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/spell-check.yml) [![Sync Labels](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/arduino-libraries/Arduino_UnifiedStorage/actions/workflows/sync-labels.yml) The Arduino_UnifiedStorage library provides a unified interface to access different types of storage, including internal storage, SD cards, and USB mass storage devices. It simplifies the handling of files and directories across multiple storage mediums on Portenta, Opta, and some Nicla boards. diff --git a/examples/AdvancedUSBInternalOperations/sketch.yaml b/examples/AdvancedUSBInternalOperations/sketch.yaml new file mode 100644 index 0000000..338561f --- /dev/null +++ b/examples/AdvancedUSBInternalOperations/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + 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) + portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - 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) + opta: + notes: Portenta Opta family + 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..338561f --- /dev/null +++ b/examples/BackupInternalPartitions/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + 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) + portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - 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) + opta: + notes: Portenta Opta family + 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..338561f --- /dev/null +++ b/examples/Callbacks/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + 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) + portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - 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) + opta: + notes: Portenta Opta family + 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..338561f --- /dev/null +++ b/examples/InternalStoragePartitioning/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + 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) + portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - 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) + opta: + notes: Portenta Opta family + 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..338561f --- /dev/null +++ b/examples/Logger/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + 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) + portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - 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) + opta: + notes: Portenta Opta family + 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..338561f --- /dev/null +++ b/examples/SimpleStorageWriteRead/sketch.yaml @@ -0,0 +1,31 @@ +profiles: + 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) + portenta_c33: + notes: Portenta C33 + fqbn: arduino:renesas_portenta:portenta_c33 + platforms: + - 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) + opta: + notes: Portenta Opta family + 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