Skip to content

Commit 24edb4b

Browse files
committed
Use version of Arduino mbed-Enabled Boards from tip of default branch of ArduinoCore-mbed repository
This is necessary because compiling for the Portenta H7 M4 core board fails when using the current release version of the platform (1.2.2). The issue has been fixed, so this commit can be reverted after the next release of the Arduino mbed-Enabled Boards platform.
1 parent 0e281f7 commit 24edb4b

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/compile-examples.yml

+37
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
- name: ArduinoMqttClient
2828
# sketch paths to compile (recursive) for all boards
2929
UNIVERSAL_SKETCH_PATHS: '"examples/ArduinoIoTCloud-Advanced" "examples/ArduinoIoTCloud-Basic" "examples/utility/ArduinoIoTCloud_Travis_CI"'
30+
ARDUINOCORE_MBED_STAGING_PATH: extras/ArduinoCore-mbed
31+
ARDUINOCORE_API_STAGING_PATH: extras/ArduinoCore-API
3032

3133
strategy:
3234
fail-fast: false
@@ -102,7 +104,11 @@ jobs:
102104
- board:
103105
type: "mbed"
104106
platforms: |
107+
# Install Arduino mbed-Enabled Boards via Boards Manager for the toolchain
105108
- name: arduino-beta:mbed
109+
# Overwrite the Arduino mbed-Enabled Boards release version with version from the tip of the master branch (located in local path because of the need to first install ArduinoCore-API)
110+
- source-path: extras/ArduinoCore-mbed
111+
name: arduino-beta:mbed
106112
libraries: |
107113
- name: ArduinoECCX08
108114
sketch-paths: '"examples/utility/Provisioning"'
@@ -120,6 +126,37 @@ jobs:
120126
- name: Checkout
121127
uses: actions/checkout@v2
122128

129+
# it's necessary to checkout the platform before installing it so that the ArduinoCore-API dependency can be added
130+
- name: Checkout ArduinoCore-mbed
131+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
132+
if: matrix.board.type == 'mbed'
133+
uses: actions/checkout@v2
134+
with:
135+
repository: arduino/ArduinoCore-mbed
136+
# the arduino/actions/libraries/compile-examples action will install the platform from this path
137+
path: ${{ env.ARDUINOCORE_MBED_STAGING_PATH }}
138+
139+
- name: Remove ArduinoCore-API symlink from Arduino mbed-Enabled Boards platform
140+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
141+
if: matrix.board.type == 'mbed'
142+
run: rm "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino/api"
143+
144+
- name: Checkout ArduinoCore-API
145+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
146+
if: matrix.board.type == 'mbed'
147+
uses: actions/checkout@v2
148+
with:
149+
repository: arduino/ArduinoCore-API
150+
# as specified at https://github.com/arduino/ArduinoCore-mbed/blob/master/README.md#installation
151+
ref: namespace_arduino
152+
path: ${{ env.ARDUINOCORE_API_STAGING_PATH }}
153+
154+
- name: Install ArduinoCore-API
155+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
156+
if: matrix.board.type == 'mbed'
157+
run: |
158+
mv "${{ env.ARDUINOCORE_API_STAGING_PATH }}/api" "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino"
159+
123160
- name: Compile examples
124161
uses: arduino/actions/libraries/compile-examples@master
125162
with:

0 commit comments

Comments
 (0)