Skip to content

Commit 4f855f2

Browse files
authored
Merge pull request #32 from arduino-libraries/add-all-cloud-boards-to-ci
Adding all WiFi enabled boards as CI build target.
2 parents 8c8de83 + 18aadb0 commit 4f855f2

File tree

8 files changed

+67
-9
lines changed

8 files changed

+67
-9
lines changed

.github/workflows/compile-examples.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,32 @@ on: [push, pull_request]
33
jobs:
44
build:
55
runs-on: ubuntu-latest
6+
env:
7+
LIBRARIES: WiFi101 WiFiNINA
68

79
strategy:
810
matrix:
911
fqbn: [
12+
"arduino:samd:mkr1000",
1013
"arduino:samd:mkrwifi1010",
11-
"arduino:megaavr:uno2018"
14+
"arduino:samd:nano_33_iot",
15+
"arduino:megaavr:uno2018",
16+
'"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"'
1217
]
1318

1419
steps:
1520
- uses: actions/checkout@v1
1621
with:
1722
fetch-depth: 1
18-
- uses: arduino/actions/libraries/compile-examples@master
23+
- name: compile-examples for official Arduino boards
24+
if: startsWith(matrix.fqbn, '"esp8266:esp8266') != true
25+
uses: arduino/actions/libraries/compile-examples@master
1926
with:
2027
fqbn: ${{ matrix.fqbn }}
21-
libraries: WiFiNINA
28+
libraries: ${{ env.LIBRARIES }}
29+
- name: compile-examples for ESP8266 boards
30+
if: startsWith(matrix.fqbn, '"esp8266:esp8266')
31+
uses: arduino/actions/libraries/compile-examples@master
32+
with:
33+
fqbn: ${{ matrix.fqbn }}
34+
entrypoint: /github/workspace/.github/workflows/install-python-wrapper.sh
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash -x
2+
# This script is used as an alternate entrypoint to allow installing Python 3 (a dependency of
3+
# the ESP8266 core for Arduino) in the Docker container used by the compile-examples action
4+
5+
# Install Python 3
6+
apt-get update && apt-get install -y python3
7+
8+
# Run the standard entrypoint script
9+
/entrypoint.sh "$@"

examples/WiFiAdvancedCallback/WiFiAdvancedCallback.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@
1616
*/
1717

1818
#include <ArduinoMqttClient.h>
19-
#include <WiFiNINA.h> // for MKR1000 change to: #include <WiFi101.h>
19+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
20+
#include <WiFiNINA.h>
21+
#elif defined(ARDUINO_SAMD_MKR1000)
22+
#include <WiFi101.h>
23+
#elif defined(ARDUINO_ESP8266_ESP12)
24+
#include <ESP8266WiFi.h>
25+
#endif
2026

2127
#include "arduino_secrets.h"
2228
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

examples/WiFiEcho/WiFiEcho.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
*/
1313

1414
#include <ArduinoMqttClient.h>
15-
#include <WiFiNINA.h> // for MKR1000 change to: #include <WiFi101.h>
15+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
16+
#include <WiFiNINA.h>
17+
#elif defined(ARDUINO_SAMD_MKR1000)
18+
#include <WiFi101.h>
19+
#elif defined(ARDUINO_ESP8266_ESP12)
20+
#include <ESP8266WiFi.h>
21+
#endif
1622

1723
#include "arduino_secrets.h"
1824
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

examples/WiFiEchoCallback/WiFiEchoCallback.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@
1313
*/
1414

1515
#include <ArduinoMqttClient.h>
16-
#include <WiFiNINA.h> // for MKR1000 change to: #include <WiFi101.h>
16+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
17+
#include <WiFiNINA.h>
18+
#elif defined(ARDUINO_SAMD_MKR1000)
19+
#include <WiFi101.h>
20+
#elif defined(ARDUINO_ESP8266_ESP12)
21+
#include <ESP8266WiFi.h>
22+
#endif
1723

1824
#include "arduino_secrets.h"
1925
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

examples/WiFiSimpleReceive/WiFiSimpleReceive.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
*/
1212

1313
#include <ArduinoMqttClient.h>
14-
#include <WiFiNINA.h> // for MKR1000 change to: #include <WiFi101.h>
14+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
15+
#include <WiFiNINA.h>
16+
#elif defined(ARDUINO_SAMD_MKR1000)
17+
#include <WiFi101.h>
18+
#elif defined(ARDUINO_ESP8266_ESP12)
19+
#include <ESP8266WiFi.h>
20+
#endif
1521

1622
#include "arduino_secrets.h"
1723
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

examples/WiFiSimpleReceiveCallback/WiFiSimpleReceiveCallback.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
*/
1313

1414
#include <ArduinoMqttClient.h>
15-
#include <WiFiNINA.h> // for MKR1000 change to: #include <WiFi101.h>
15+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
16+
#include <WiFiNINA.h>
17+
#elif defined(ARDUINO_SAMD_MKR1000)
18+
#include <WiFi101.h>
19+
#elif defined(ARDUINO_ESP8266_ESP12)
20+
#include <ESP8266WiFi.h>
21+
#endif
1622

1723
#include "arduino_secrets.h"
1824
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

examples/WiFiSimpleSender/WiFiSimpleSender.ino

+7-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
*/
1212

1313
#include <ArduinoMqttClient.h>
14-
#include <WiFiNINA.h> // for MKR1000 change to: #include <WiFi101.h>
14+
#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2)
15+
#include <WiFiNINA.h>
16+
#elif defined(ARDUINO_SAMD_MKR1000)
17+
#include <WiFi101.h>
18+
#elif defined(ARDUINO_ESP8266_ESP12)
19+
#include <ESP8266WiFi.h>
20+
#endif
1521

1622
#include "arduino_secrets.h"
1723
///////please enter your sensitive data in the Secret tab/arduino_secrets.h

0 commit comments

Comments
 (0)