Skip to content

Merge pull request #379 from pennam/esp32-bundle #1028

Merge pull request #379 from pennam/esp32-bundle

Merge pull request #379 from pennam/esp32-bundle #1028

name: Compile Examples
on:
pull_request:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
push:
paths:
- ".github/workflows/compile-examples.yml"
- "examples/**"
- "src/**"
jobs:
build:
runs-on: ubuntu-latest
env:
# libraries to install for all boards
UNIVERSAL_LIBRARIES: |
# Install the ArduinoIoTCloud library from the repository
- source-path: ./
- name: Arduino_ConnectionHandler
- name: Arduino_DebugUtils
- name: ArduinoMqttClient
# sketch paths to compile (recursive) for all boards
UNIVERSAL_SKETCH_PATHS: |
- examples/ArduinoIoTCloud-Advanced
- examples/ArduinoIoTCloud-Basic
- examples/ArduinoIoTCloud-Callbacks
- examples/ArduinoIoTCloud-Schedule
- examples/utility/ArduinoIoTCloud_Travis_CI
SKETCHES_REPORTS_PATH: sketches-reports
strategy:
fail-fast: false
matrix:
board:
- fqbn: arduino:samd:mkr1000
type: mkr1000
- fqbn: arduino:samd:mkrwifi1010
type: nina
- fqbn: arduino:samd:nano_33_iot
type: nina
- fqbn: arduino:samd:mkrwan1300
type: wan
- fqbn: arduino:samd:mkrgsm1400
type: gsm
- fqbn: arduino:samd:mkrnb1500
type: nb
- fqbn: arduino:mbed_portenta:envie_m7
type: mbed_portenta
- fqbn: esp8266:esp8266:huzzah
type: esp8266
- fqbn: esp32:esp32:esp32
type: esp32
- fqbn: arduino:mbed_nano:nanorp2040connect
type: nina
- fqbn: arduino:mbed_nicla:nicla_vision
type: mbed_nicla
- fqbn: arduino:mbed_opta:opta
type: mbed_opta
- fqbn: arduino:mbed_giga:giga
type: mbed_giga
- fqbn: arduino:renesas_portenta:portenta_c33
type: renesas_portenta
- fqbn: arduino:renesas_uno:unor4wifi
type: renesas_uno
- fqbn: arduino:esp32:nano_nora
type: arduino_esp32
# make board type-specific customizations to the matrix jobs
include:
# MKR 1000
- board:
type: mkr1000
platforms: |
# Install samd platform via Boards Manager
- name: arduino:samd
libraries: |
- name: ArduinoECCX08
- name: RTCZero
- name: WiFi101
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
sketch-paths: |
- examples/utility/Provisioning
# MKR WiFi 1010, Nano 33 IoT, Nano RP2040 Connect
- board:
type: nina
platforms: |
# Install samd and mbed_nano platform via Boards Manager
- name: arduino:samd
- name: arduino:mbed_nano
libraries: |
- name: ArduinoECCX08
- name: RTCZero
- name: WiFiNINA
- name: Arduino_JSON
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/utility/Provisioning
- examples/utility/SelfProvisioning
- board:
type: wan
platforms: |
# Install samd platform via Boards Manager
- name: arduino:samd
libraries: |
- name: ArduinoECCX08
- name: RTCZero
- name: MKRWAN
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
sketch-paths:
# GSM boards
- board:
type: gsm
platforms: |
# Install samd platform via Boards Manager
- name: arduino:samd
libraries: |
- name: ArduinoECCX08
- name: RTCZero
- name: MKRGSM
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
sketch-paths: |
- examples/utility/Provisioning
# NB boards
- board:
type: nb
platforms: |
# Install samd platform via Boards Manager
- name: arduino:samd
libraries: |
- name: ArduinoECCX08
- name: RTCZero
- name: MKRNB
- source-url: https://github.com/adafruit/Adafruit_SleepyDog.git
sketch-paths: |
- examples/utility/Provisioning
# Portenta
- board:
type: mbed_portenta
platforms: |
# Install mbed_portenta platform via Boards Manager
- name: arduino:mbed_portenta
libraries: |
- name: ArduinoECCX08
- name: Arduino_Portenta_OTA
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/utility/Provisioning
# Nicla Vision
- board:
type: mbed_nicla
platforms: |
# Install mbed_nicla platform via Boards Manager
- name: arduino:mbed_nicla
libraries: |
- name: Arduino_Portenta_OTA
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/utility/Provisioning
# Opta
- board:
type: mbed_opta
platforms: |
# Install mbed_opta platform via Boards Manager
- name: arduino:mbed_opta
libraries: |
- name: ArduinoECCX08
- name: Arduino_Portenta_OTA
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/utility/Provisioning
# GIGA
- board:
type: mbed_giga
platforms: |
# Install mbed_giga platform via Boards Manager
- name: arduino:mbed_giga
libraries: |
- name: ArduinoECCX08
- name: Arduino_Portenta_OTA
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/utility/Provisioning
# Portenta C33
- board:
type: renesas_portenta
platforms: |
# Install renesas_portenta platform via Boards Manager
- name: arduino:renesas_portenta
sketch-paths: |
- examples/utility/Provisioning
# UNO R4 WiFi
- board:
type: renesas_uno
platforms: |
# Install renesas_uno platform via Boards Manager
- name: arduino:renesas_uno
# Nano ESP32
- board:
type: arduino_esp32
platforms: |
# Install arduino_esp32 platform via Boards Manager
- name: arduino:esp32
libraries: |
- name: Arduino_ESP32_OTA
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
# ESP8266 boards
- board:
type: esp8266
platforms: |
# Install ESP8266 platform via Boards Manager
- name: esp8266:esp8266
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
# Use the version currently installed in Arduino Cloud
version: 2.5.0
libraries:
sketch-paths:
# ESP32 boards
- board:
type: esp32
platforms: |
# Install ESP32 platform via Boards Manager
- name: esp32:esp32
source-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
libraries: |
- name: Arduino_ESP32_OTA
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install ESP32 platform dependencies
if: matrix.board.type == 'esp32'
run: pip3 install pyserial
- name: Compile examples
uses: arduino/compile-sketches@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
platforms: ${{ matrix.platforms }}
fqbn: ${{ matrix.board.fqbn }}
libraries: |
${{ env.UNIVERSAL_LIBRARIES }}
${{ matrix.libraries }}
sketch-paths: |
${{ env.UNIVERSAL_SKETCH_PATHS }}
${{ matrix.sketch-paths }}
enable-deltas-report: "true"
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Write data to size trends report spreadsheet
# Update report on every push to the master branch
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: arduino/report-size-trends@main
with:
sketches-report-path: ${{ env.SKETCHES_REPORTS_PATH }}
google-key-file: ${{ secrets.GOOGLE_KEY_FILE }}
spreadsheet-id: 1I6NZkpZpf8KugBkE92adB1Z3_b7ZepOpCdYTOigJpN4
- name: Save memory usage change report as artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v2
with:
name: ${{ env.SKETCHES_REPORTS_PATH }}
path: ${{ env.SKETCHES_REPORTS_PATH }}