Skip to content

Commit 8a3b0e8

Browse files
authored
Merge pull request #183 from per1234/portenta-ci
Add Portenta boards to Compile Examples CI workflow
2 parents 595279a + 24edb4b commit 8a3b0e8

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

Diff for: .github/workflows/compile-examples.yml

+47
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
@@ -39,6 +41,8 @@ jobs:
3941
{"fqbn": "arduino:samd:mkrwan1300", "type": "wan"},
4042
{"fqbn": "arduino:samd:mkrgsm1400", "type": "gsm"},
4143
{"fqbn": "arduino:samd:mkrnb1500", "type": "nb"},
44+
{"fqbn": "arduino-beta:mbed:envie_m4", "type": "mbed"},
45+
{"fqbn": "arduino-beta:mbed:envie_m7", "type": "mbed"},
4246
{"fqbn": "esp8266:esp8266:huzzah", "type": "esp8266"}
4347
]
4448

@@ -87,6 +91,18 @@ jobs:
8791
- name: RTCZero
8892
- name: MKRNB
8993
sketch-paths: '"examples/utility/Provisioning"'
94+
# Portenta
95+
- board:
96+
type: "mbed"
97+
platforms: |
98+
# Install Arduino mbed-Enabled Boards via Boards Manager for the toolchain
99+
- name: arduino-beta:mbed
100+
# 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)
101+
- source-path: extras/ArduinoCore-mbed
102+
name: arduino-beta:mbed
103+
libraries: |
104+
- name: ArduinoECCX08
105+
sketch-paths: '"examples/utility/Provisioning"'
90106
# ESP8266 boards
91107
- board:
92108
type: "esp8266"
@@ -101,6 +117,37 @@ jobs:
101117
- name: Checkout
102118
uses: actions/checkout@v2
103119

120+
# it's necessary to checkout the platform before installing it so that the ArduinoCore-API dependency can be added
121+
- name: Checkout ArduinoCore-mbed
122+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
123+
if: matrix.board.type == 'mbed'
124+
uses: actions/checkout@v2
125+
with:
126+
repository: arduino/ArduinoCore-mbed
127+
# the arduino/actions/libraries/compile-examples action will install the platform from this path
128+
path: ${{ env.ARDUINOCORE_MBED_STAGING_PATH }}
129+
130+
- name: Remove ArduinoCore-API symlink from Arduino mbed-Enabled Boards platform
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+
run: rm "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino/api"
134+
135+
- name: Checkout ArduinoCore-API
136+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
137+
if: matrix.board.type == 'mbed'
138+
uses: actions/checkout@v2
139+
with:
140+
repository: arduino/ArduinoCore-API
141+
# as specified at https://github.com/arduino/ArduinoCore-mbed/blob/master/README.md#installation
142+
ref: namespace_arduino
143+
path: ${{ env.ARDUINOCORE_API_STAGING_PATH }}
144+
145+
- name: Install ArduinoCore-API
146+
# this step only needed when the Arduino mbed-Enabled Boards platform sourced from the repository is being used
147+
if: matrix.board.type == 'mbed'
148+
run: |
149+
mv "${{ env.ARDUINOCORE_API_STAGING_PATH }}/api" "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino"
150+
104151
- name: Compile examples
105152
uses: arduino/actions/libraries/compile-examples@master
106153
with:

0 commit comments

Comments
 (0)