diff --git a/.github/workflows/compile-examples.yml b/.github/workflows/compile-examples.yml index 52a158a..7aab170 100644 --- a/.github/workflows/compile-examples.yml +++ b/.github/workflows/compile-examples.yml @@ -3,19 +3,32 @@ on: [push, pull_request] jobs: build: runs-on: ubuntu-latest + env: + LIBRARIES: WiFi101 WiFiNINA strategy: matrix: fqbn: [ + "arduino:samd:mkr1000", "arduino:samd:mkrwifi1010", - "arduino:megaavr:uno2018" + "arduino:samd:nano_33_iot", + "arduino:megaavr:uno2018", + '"esp8266:esp8266:huzzah" "https://arduino.esp8266.com/stable/package_esp8266com_index.json"' ] steps: - uses: actions/checkout@v1 with: fetch-depth: 1 - - uses: arduino/actions/libraries/compile-examples@master + - name: compile-examples for official Arduino boards + if: startsWith(matrix.fqbn, '"esp8266:esp8266') != true + uses: arduino/actions/libraries/compile-examples@master with: fqbn: ${{ matrix.fqbn }} - libraries: WiFiNINA + libraries: ${{ env.LIBRARIES }} + - name: compile-examples for ESP8266 boards + if: startsWith(matrix.fqbn, '"esp8266:esp8266') + uses: arduino/actions/libraries/compile-examples@master + with: + fqbn: ${{ matrix.fqbn }} + entrypoint: /github/workspace/.github/workflows/install-python-wrapper.sh diff --git a/.github/workflows/install-python-wrapper.sh b/.github/workflows/install-python-wrapper.sh new file mode 100755 index 0000000..6d818f8 --- /dev/null +++ b/.github/workflows/install-python-wrapper.sh @@ -0,0 +1,9 @@ +#!/bin/bash -x +# This script is used as an alternate entrypoint to allow installing Python 3 (a dependency of +# the ESP8266 core for Arduino) in the Docker container used by the compile-examples action + +# Install Python 3 +apt-get update && apt-get install -y python3 + +# Run the standard entrypoint script +/entrypoint.sh "$@" diff --git a/examples/WiFiAdvancedCallback/WiFiAdvancedCallback.ino b/examples/WiFiAdvancedCallback/WiFiAdvancedCallback.ino index 54c13f7..87746d0 100644 --- a/examples/WiFiAdvancedCallback/WiFiAdvancedCallback.ino +++ b/examples/WiFiAdvancedCallback/WiFiAdvancedCallback.ino @@ -16,7 +16,13 @@ */ #include -#include // for MKR1000 change to: #include +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2) + #include +#elif defined(ARDUINO_SAMD_MKR1000) + #include +#elif defined(ARDUINO_ESP8266_ESP12) + #include +#endif #include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h diff --git a/examples/WiFiEcho/WiFiEcho.ino b/examples/WiFiEcho/WiFiEcho.ino index 2c23095..980dcf3 100644 --- a/examples/WiFiEcho/WiFiEcho.ino +++ b/examples/WiFiEcho/WiFiEcho.ino @@ -12,7 +12,13 @@ */ #include -#include // for MKR1000 change to: #include +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2) + #include +#elif defined(ARDUINO_SAMD_MKR1000) + #include +#elif defined(ARDUINO_ESP8266_ESP12) + #include +#endif #include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h diff --git a/examples/WiFiEchoCallback/WiFiEchoCallback.ino b/examples/WiFiEchoCallback/WiFiEchoCallback.ino index 03f5adc..f168a9f 100644 --- a/examples/WiFiEchoCallback/WiFiEchoCallback.ino +++ b/examples/WiFiEchoCallback/WiFiEchoCallback.ino @@ -13,7 +13,13 @@ */ #include -#include // for MKR1000 change to: #include +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2) + #include +#elif defined(ARDUINO_SAMD_MKR1000) + #include +#elif defined(ARDUINO_ESP8266_ESP12) + #include +#endif #include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h diff --git a/examples/WiFiSimpleReceive/WiFiSimpleReceive.ino b/examples/WiFiSimpleReceive/WiFiSimpleReceive.ino index 082b53e..88df6e7 100644 --- a/examples/WiFiSimpleReceive/WiFiSimpleReceive.ino +++ b/examples/WiFiSimpleReceive/WiFiSimpleReceive.ino @@ -11,7 +11,13 @@ */ #include -#include // for MKR1000 change to: #include +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2) + #include +#elif defined(ARDUINO_SAMD_MKR1000) + #include +#elif defined(ARDUINO_ESP8266_ESP12) + #include +#endif #include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h diff --git a/examples/WiFiSimpleReceiveCallback/WiFiSimpleReceiveCallback.ino b/examples/WiFiSimpleReceiveCallback/WiFiSimpleReceiveCallback.ino index 556a7f0..3e1bd09 100644 --- a/examples/WiFiSimpleReceiveCallback/WiFiSimpleReceiveCallback.ino +++ b/examples/WiFiSimpleReceiveCallback/WiFiSimpleReceiveCallback.ino @@ -12,7 +12,13 @@ */ #include -#include // for MKR1000 change to: #include +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2) + #include +#elif defined(ARDUINO_SAMD_MKR1000) + #include +#elif defined(ARDUINO_ESP8266_ESP12) + #include +#endif #include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h diff --git a/examples/WiFiSimpleSender/WiFiSimpleSender.ino b/examples/WiFiSimpleSender/WiFiSimpleSender.ino index 8128dd8..33ce01d 100644 --- a/examples/WiFiSimpleSender/WiFiSimpleSender.ino +++ b/examples/WiFiSimpleSender/WiFiSimpleSender.ino @@ -11,7 +11,13 @@ */ #include -#include // for MKR1000 change to: #include +#if defined(ARDUINO_SAMD_MKRWIFI1010) || defined(ARDUINO_SAMD_NANO_33_IOT) || defined(ARDUINO_AVR_UNO_WIFI_REV2) + #include +#elif defined(ARDUINO_SAMD_MKR1000) + #include +#elif defined(ARDUINO_ESP8266_ESP12) + #include +#endif #include "arduino_secrets.h" ///////please enter your sensitive data in the Secret tab/arduino_secrets.h