From 0cc9bfdfcd9e0fdc9fb5d24a13542f19f7b8e8cd Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 22 Apr 2016 16:36:09 -0700 Subject: [PATCH 01/10] First attempt to add modem tests to travis --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a41c078a..9dcf598d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,10 @@ install: - ( cd ${HOME} && curl -O https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz && tar xvf arduino-${ARDUINO_VERSION}-linux64.tar.xz ) - git clone --branch ${ARDUINO_ESP8266_VERSION} https://github.com/esp8266/Arduino.git ${ARDUINO_ESP8266_ROOT} - ( cd ${ARDUINO_ESP8266_ROOT}/tools && python get.py ) +- make get-deps 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.1.1 ArduinoJson ) 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/FirebasePush_ESP8266/FirebasePush_ESP8266.ino +- (cd test/modem/ && make test) From 79da39b4eec73c4ac452998c6506e61de6e06f5c Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 22 Apr 2016 16:46:06 -0700 Subject: [PATCH 02/10] attempt2 removed uneeded install script, added submodule init and update. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9dcf598d..b2a6aed2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,8 @@ env: install: - ( cd ${HOME} && curl -O https://downloads.arduino.cc/arduino-${ARDUINO_VERSION}-linux64.tar.xz && tar xvf arduino-${ARDUINO_VERSION}-linux64.tar.xz ) - 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 ) -- make get-deps 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.1.1 ArduinoJson ) From 9c83d1e36fcb40a2d731f7e21283474171a48504 Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 22 Apr 2016 16:50:57 -0700 Subject: [PATCH 03/10] Lets try c++ --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b2a6aed2..1cef8343 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -language: c +language: c++ sudo: false env: - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.1.0 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino From 48f66722b4f4b8d28be6934baaf08ed3f4bda438 Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 22 Apr 2016 16:54:40 -0700 Subject: [PATCH 04/10] Upgrade to trusty. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1cef8343..ac1acb9b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: c++ sudo: false +# Trusty gives us GCC 4.8 which supports c++11. +dist: trusty env: - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.1.0 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.2.0-rc1 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino From 9a16bd1c3730e2a0afb671346b30ac83350ceb66 Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 22 Apr 2016 16:57:52 -0700 Subject: [PATCH 05/10] Need sudo for trusty. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ac1acb9b..a4cc5a2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ language: c++ -sudo: false +# Need sudo for trusty. +sudo: required # Trusty gives us GCC 4.8 which supports c++11. dist: trusty env: From e1f149e9b936173722d1934de6c08f878d1440ee Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Tue, 26 Apr 2016 16:23:17 -0700 Subject: [PATCH 06/10] Attempt to build gcc with apt. --- .travis.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4cc5a2b..0e728d6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: c++ -# Need sudo for trusty. -sudo: required -# Trusty gives us GCC 4.8 which supports c++11. -dist: trusty +compiler: + - gcc env: - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.1.0 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.2.0-rc1 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino @@ -18,3 +16,10 @@ before_script: 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/FirebasePush_ESP8266/FirebasePush_ESP8266.ino - (cd test/modem/ && make test) +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 From 38ee9be1cf9be4fbb9c52124441cff6809d155ce Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Tue, 26 Apr 2016 16:26:42 -0700 Subject: [PATCH 07/10] attempt 2 to use apt. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0e728d6e..1acaa472 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: c++ +sudo: false compiler: - gcc env: @@ -6,6 +7,7 @@ env: - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.2.0-rc1 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino - 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 ) - git clone --branch ${ARDUINO_ESP8266_VERSION} https://github.com/esp8266/Arduino.git ${ARDUINO_ESP8266_ROOT} - git submodule init && git submodule update From 5b1b8d4d0e6cfb3b7bc9945dac88e378eb0111bc Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Tue, 26 Apr 2016 17:21:06 -0700 Subject: [PATCH 08/10] Add const modifier back to response(). This broke the unit tests. --- src/Firebase.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Firebase.h b/src/Firebase.h index b0f00895..5c06890e 100644 --- a/src/Firebase.h +++ b/src/Firebase.h @@ -95,7 +95,7 @@ class FirebaseCall { return error_; } - virtual const String& response() { + virtual const String& response() const { return response_; } From aaadbc2bd93c155ac300a278f2fb8b79637d7b75 Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 29 Apr 2016 12:35:03 -0700 Subject: [PATCH 09/10] Add virtual destructors now that we have virtual methods. --- src/Firebase.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Firebase.h b/src/Firebase.h index 5c06890e..a8751746 100644 --- a/src/Firebase.h +++ b/src/Firebase.h @@ -91,6 +91,8 @@ class FirebaseCall { const char* method, const String& path, const String& data = "", FirebaseHttpClient* http = NULL); + virtual ~FirebaseCall() {} + virtual const FirebaseError& error() const { return error_; } @@ -134,6 +136,7 @@ class FirebasePush : public FirebaseCall { FirebasePush() {} FirebasePush(const String& host, const String& auth, const String& path, const String& value, FirebaseHttpClient* http = NULL); + virtual ~FirebasePush() {} virtual const String& name() const { return name_; @@ -156,6 +159,7 @@ class FirebaseStream : public FirebaseCall { FirebaseStream() {} FirebaseStream(const String& host, const String& auth, const String& path, FirebaseHttpClient* http = NULL); + virtual ~FirebaseStream() {} // Return if there is any event available to read. virtual bool available(); From 10a3e4ef094e0f426fb206867249fb2f54284c83 Mon Sep 17 00:00:00 2001 From: Ed Coyne Date: Fri, 29 Apr 2016 12:43:01 -0700 Subject: [PATCH 10/10] add back override for gcc 4.8 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d5a4e91e..0d5661c1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,7 @@ env: - ARDUINO_VERSION=1.6.8 ARDUINO_ESP8266_VERSION=2.2.0-rc1 ARDUINO_ROOT=${HOME}/arduino-${ARDUINO_VERSION} ARDUINO_ESP8266_ROOT=${ARDUINO_ROOT}/hardware/esp8266com/esp8266 ARDUINO_HOME=${HOME}/Arduino - 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 ) - git clone --branch ${ARDUINO_ESP8266_VERSION} https://github.com/esp8266/Arduino.git ${ARDUINO_ESP8266_ROOT} - git submodule init && git submodule update