From 506a1a8f529e33fed8d748df6d32fa4a6da0b652 Mon Sep 17 00:00:00 2001
From: Cristian Maglie <c.maglie@arduino.cc>
Date: Wed, 18 Sep 2024 10:47:04 +0200
Subject: [PATCH 1/4] Upgrade upload/artifacts action to v4

---
 .github/workflows/compile-examples.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml
index 645f35f96..9a8d479c1 100644
--- a/.github/workflows/compile-examples.yml
+++ b/.github/workflows/compile-examples.yml
@@ -226,7 +226,7 @@ jobs:
 
       - name: Save memory usage change report as artifact
         if: github.event_name == 'pull_request'
-        uses: actions/upload-artifact@v2
+        uses: actions/upload-artifact@v4
         with:
           path: ${{ env.SKETCHES_REPORTS_PATH }}
           name: ${{ env.SKETCHES_REPORTS_PATH }}

From 124f27d962951cab0f31ba3335c9c28a6b22d765 Mon Sep 17 00:00:00 2001
From: Cristian Maglie <c.maglie@arduino.cc>
Date: Wed, 18 Sep 2024 10:56:23 +0200
Subject: [PATCH 2/4] Make artifacts name unique

---
 .github/workflows/compile-examples.yml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml
index 9a8d479c1..3484575ee 100644
--- a/.github/workflows/compile-examples.yml
+++ b/.github/workflows/compile-examples.yml
@@ -34,14 +34,23 @@ jobs:
       matrix:
         board:
           - fqbn: arduino:mbed:nano33ble
+            id: nano33ble
           - fqbn: arduino:mbed:envie_m7
+            id: envie_m7
           - fqbn: arduino:mbed:nanorp2040connect
+            id: nanorp2040connect
           - fqbn: arduino:mbed:nicla_sense
+            id: nicla_sense
           - fqbn: arduino:mbed:nicla_vision
+            id: nicla_vision
           - fqbn: arduino:mbed:opta
+            id: opta
           - fqbn: arduino:mbed:giga
+            id: giga
           - fqbn: arduino:mbed:nicla_voice
+            id: nicla_voice
           - fqbn: arduino:mbed:edge_control
+            id: edge_control
 
         # compile only the examples compatible with each board
         include:
@@ -229,4 +238,4 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           path: ${{ env.SKETCHES_REPORTS_PATH }}
-          name: ${{ env.SKETCHES_REPORTS_PATH }}
+          name: ${{ env.SKETCHES_REPORTS_PATH }}-${{ matrix.board.id }}

From d5329d9b938333a0bdcedb4f24f07c8f70331d95 Mon Sep 17 00:00:00 2001
From: Cristian Maglie <c.maglie@arduino.cc>
Date: Wed, 18 Sep 2024 11:25:54 +0200
Subject: [PATCH 3/4] Added missing core_cm4 matrix element

---
 .github/workflows/compile-examples.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml
index 3484575ee..eba0381e2 100644
--- a/.github/workflows/compile-examples.yml
+++ b/.github/workflows/compile-examples.yml
@@ -37,6 +37,8 @@ jobs:
             id: nano33ble
           - fqbn: arduino:mbed:envie_m7
             id: envie_m7
+          - fqbn: arduino:mbed:envie_m7:target_core=cm4
+            id: envie_m7_core_cm4
           - fqbn: arduino:mbed:nanorp2040connect
             id: nanorp2040connect
           - fqbn: arduino:mbed:nicla_sense

From 8efdfe066abbb17bfefbe3c4ed72c3b37642d523 Mon Sep 17 00:00:00 2001
From: Cristian Maglie <c.maglie@arduino.cc>
Date: Wed, 18 Sep 2024 11:29:18 +0200
Subject: [PATCH 4/4] Update actions/checkout to v4

---
 .github/workflows/compile-examples.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml
index eba0381e2..6cb1406db 100644
--- a/.github/workflows/compile-examples.yml
+++ b/.github/workflows/compile-examples.yml
@@ -198,11 +198,11 @@ jobs:
               
     steps:
       - name: Checkout repository
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
 
       # The source files are in a subfolder of the ArduinoCore-API repository, so it's not possible to clone it directly to the final destination in the core
       - name: Checkout ArduinoCore-API
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
         with:
           repository: arduino/ArduinoCore-API
           path: ArduinoCore-API