-
Notifications
You must be signed in to change notification settings - Fork 491
Add other examples to travis #110
Changes from 6 commits
61ab7fd
491f9b1
adbd10d
41b56b4
02db961
e71b59d
9cfb6ba
45d980f
26d6fab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
language: c++ | ||
cache: ccache | ||
sudo: false | ||
addons: | ||
apt: | ||
|
@@ -12,17 +13,23 @@ env: | |
- ARDUINO_VERSION=nightly ARDUINO_ESP8266_VERSION=master ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino | ||
install: | ||
- if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi | ||
- ( cd ${HOME} && curl -O https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz && tar xvf arduino-${ARDUINO_VERSION}-linux64.tar.xz ) | ||
- ( cd ${HOME} && curl -O https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz && tar xf arduino-${ARDUINO_VERSION}-linux64.tar.xz ) | ||
- ( cd ${HOME} && wget -q -O SoftwareSerial.zip https://github.com/plerup/espsoftwareserial/archive/097712eb07f5b3a70ef419b6e7a7ed2ada5aab85.zip && unzip -q SoftwareSerial.zip | ||
&& rm -rf SoftwareSerial.zip && mv espsoftwareserial-* SoftwareSerial) | ||
- (cd ${HOME} && LIB=Adafruit_NeoPixel && wget https://github.com/adafruit/$LIB/archive/master.zip -O $LIB.zip && unzip $LIB.zip && mv $LIB-master $LIB) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are we sure we want master? it would be nice to use env var and target the stable version and master in different build. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no easy way to do that. We could lock them onto various versions. The master is just easiest because they would all have the same url, but master could definitely be troublesome if these go into active development. I will lock them all to their current latest version. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so if you define an env variable with a version suffix in the When We could add the stable version of the lib to a. and b. and master to c. to get better converage. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess we could, adding a variable for each library seemed like a lot of work but it shouldn't be too bad. I guess I really meant a lot of noise more than work. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy to do it in a separate PR if you file an issue after merging :) |
||
- (cd ${HOME} && LIB=Adafruit-GFX-Library && wget https://github.com/adafruit/$LIB/archive/master.zip -O $LIB.zip && unzip $LIB.zip && mv $LIB-master $LIB) | ||
- (cd ${HOME} && LIB=Adafruit_SSD1306 && wget https://github.com/adafruit/$LIB/archive/master.zip -O $LIB.zip && unzip $LIB.zip && mv $LIB-master $LIB) | ||
- git clone --branch ${ARDUINO_ESP8266_VERSION} https://github.com/esp8266/Arduino.git ${ARDUINO_ESP8266_ROOT} | ||
- git submodule init && git submodule update | ||
- ( cd ${ARDUINO_ESP8266_ROOT}/tools && python get.py ) | ||
before_script: | ||
- mkdir -p ${ARDUINO_HOME}/libraries | ||
- ( cd ${ARDUINO_HOME}/libraries && ln -s ${TRAVIS_BUILD_DIR} firebase-arduino && ln -s ${TRAVIS_BUILD_DIR}/src/third-party/arduino-json-5.2 ArduinoJson && ln -s ${HOME}/SoftwareSerial SoftwareSerial ) | ||
- ( cd ${ARDUINO_HOME}/libraries && ln -s ${TRAVIS_BUILD_DIR} firebase-arduino && ln -s ${TRAVIS_BUILD_DIR}/src/third-party/arduino-json-5.2 ArduinoJson && ln -s ${HOME}/SoftwareSerial ./ | ||
&& ln -s ${HOME}/Adafruit_NeoPixel ./ && ln -s ${HOME}/Adafruit-GFX-Library ./ && ln -s ${HOME}/Adafruit_SSD1306 ./) | ||
script: | ||
- ${ARDUINO_ROOT}/arduino-builder -verbose -hardware ${ARDUINO_ROOT}/hardware/ -tools ${ARDUINO_ESP8266_ROOT}/tools/ -tools ${ARDUINO_ROOT}/tools-builder/ -fqbn esp8266com:esp8266:nodemcuv2 -libraries ${ARDUINO_HOME}/libraries/ -prefs build.flash_ld=${ARDUINO_ESP8266_ROOT}/tools/sdk/ld/eagle.flash.4m.ld -prefs build.flash_freq=40 -prefs build.flash_size=4M examples/FirebaseDemo_ESP8266/FirebaseDemo_ESP8266.ino | ||
- ${ARDUINO_ROOT}/arduino-builder -verbose -hardware ${ARDUINO_ROOT}/hardware/ -tools ${ARDUINO_ESP8266_ROOT}/tools/ -tools ${ARDUINO_ROOT}/tools-builder/ -fqbn esp8266com:esp8266:nodemcuv2 -libraries ${ARDUINO_HOME}/libraries/ -prefs build.flash_ld=${ARDUINO_ESP8266_ROOT}/tools/sdk/ld/eagle.flash.4m.ld -prefs build.flash_freq=40 -prefs build.flash_size=4M examples/FirebaseSerialHost_ESP8266/FirebaseSerialHost_ESP8266.ino | ||
- ${ARDUINO_ROOT}/arduino-builder -verbose -hardware ${ARDUINO_ROOT}/hardware/ -tools ${ARDUINO_ESP8266_ROOT}/tools/ -tools ${ARDUINO_ROOT}/tools-builder/ -fqbn esp8266com:esp8266:nodemcuv2 -libraries ${ARDUINO_HOME}/libraries/ -prefs build.flash_ld=${ARDUINO_ESP8266_ROOT}/tools/sdk/ld/eagle.flash.4m.ld -prefs build.flash_freq=40 -prefs build.flash_size=4M examples/Firebase_ESP8266_LEDs/Firebase_ESP8266_Neopixel/Firebase_ESP8266_Neopixel.ino | ||
- ${ARDUINO_ROOT}/arduino-builder -verbose -hardware ${ARDUINO_ROOT}/hardware/ -tools ${ARDUINO_ESP8266_ROOT}/tools/ -tools ${ARDUINO_ROOT}/tools-builder/ -fqbn esp8266com:esp8266:nodemcuv2 -libraries ${ARDUINO_HOME}/libraries/ -prefs build.flash_ld=${ARDUINO_ESP8266_ROOT}/tools/sdk/ld/eagle.flash.4m.ld -prefs build.flash_freq=40 -prefs build.flash_size=4M examples/FirebaseStream_ESP8266/FirebaseStream_ESP8266.ino | ||
- (cd test && make check) | ||
- (cd test/modem/ && make test) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ | |
#include <ESP8266WiFi.h> | ||
#include <Adafruit_GFX.h> | ||
#include <Adafruit_SSD1306.h> | ||
#include <ArduinoJson.h> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since this is now built into our library you cannot include it directly. |
||
#define OLED_RESET 3 | ||
Adafruit_SSD1306 display(OLED_RESET); | ||
|
@@ -66,8 +65,8 @@ void loop() { | |
Serial.println(event); | ||
JsonObject& json = buf.parseObject((char*)event.c_str()); | ||
String path = json["path"]; | ||
float data = json["data"]; | ||
float data = json["data"]; | ||
|
||
// TODO(proppy): parse JSON object. | ||
display.clearDisplay(); | ||
display.setTextSize(2); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why no curl :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no real reason, wget is always my goto for this.