Skip to content

Add ESP32 board to "Compile Examples" CI workflow #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ jobs:
{"fqbn": "arduino:samd:mkrnb1500", "type": "nb"},
{"fqbn": "arduino:mbed:envie_m4", "type": "mbed"},
{"fqbn": "arduino:mbed:envie_m7", "type": "mbed"},
{"fqbn": "esp8266:esp8266:huzzah", "type": "esp8266"}
{"fqbn": "esp8266:esp8266:huzzah", "type": "esp8266"},
{"fqbn": "esp32:esp32:esp32", "type": "esp32"}
]

# make board type-specific customizations to the matrix jobs
Expand Down Expand Up @@ -132,6 +133,15 @@ jobs:
source-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json
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:
sketch-paths:

steps:
- name: Checkout
Expand Down Expand Up @@ -162,6 +172,10 @@ jobs:
run: |
mv "${{ env.ARDUINOCORE_API_STAGING_PATH }}/api" "${{ env.ARDUINOCORE_MBED_STAGING_PATH }}/cores/arduino"

- name: Install ESP32 platform dependencies
if: matrix.board.type == 'esp32'
run: pip3 install pyserial

- name: Compile examples
uses: arduino/compile-sketches@main
with:
Expand Down
4 changes: 4 additions & 0 deletions examples/ArduinoIoTCloud-Basic/ArduinoIoTCloud-Basic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
#include "arduino_secrets.h"
#include "thingProperties.h"

#if defined(ESP32)
static int const LED_BUILTIN = 2;
#endif

void setup() {
/* Initialize serial and wait up to 5 seconds for port to open */
Serial.begin(9600);
Expand Down
1 change: 1 addition & 0 deletions src/cbor/lib/tinycbor/src/open_memstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ typedef size_t LenType;

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#pragma GCC diagnostic ignored "-Wreturn-type"

struct Buffer
{
Expand Down