From 2b60104b86ceea6023a069d264a5da1d3b6826ef Mon Sep 17 00:00:00 2001 From: 1technophile Date: Thu, 23 Feb 2017 22:14:02 +0100 Subject: [PATCH] implementing CI with travis --- .travis.yml | 31 +++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4c4b340 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: c +env: + - BD=arduino:avr:uno + - BD=arduino:avr:mega:cpu=atmega2560 + - BD=arduino:avr:nano:cpu=atmega328 + - BD=esp8266:esp8266:nodemcuv2:CpuFrequency=80,FlashSize=4M3M +before_install: + - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_1.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :1 -ac -screen 0 1280x1024x16" + - sleep 3 + - export DISPLAY=:1.0 + - wget http://downloads.arduino.cc/arduino-1.8.1-linux64.tar.xz + - tar xf arduino-1.8.1-linux64.tar.xz + - sudo mv arduino-1.8.1 /usr/local/share/arduino + - sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino +install: + - ln -s $PWD /usr/local/share/arduino/OpenMQTTGateway + - git clone https://github.com/z3t0/Arduino-IRremote /usr/local/share/arduino/libraries/IRremote + - git clone https://github.com/markszabo/IRremoteESP8266 /usr/local/share/arduino/libraries/IRremoteESP8266 + - git clone https://github.com/ekstrand/ESP8266wifi /usr/local/share/arduino/libraries/ESP8266wifi + - git clone https://github.com/knolleary/pubsubclient /usr/local/share/arduino/libraries/pubsubclient + - git clone https://github.com/sui77/rc-switch /usr/local/share/arduino/libraries/rc-switch + - arduino --pref "boardsmanager.additional.urls=http://arduino.esp8266.com/stable/package_esp8266com_index.json" --save-prefs + - arduino --install-boards esp8266:esp8266 + - arduino --board $BD --save-prefs + - arduino --pref "compiler.warning_level=all" --save-prefs +script: + - arduino --verify --board $BD $PWD/OpenMQTTGateway.ino +notifications: + email: + on_success: change + on_failure: change \ No newline at end of file diff --git a/README.md b/README.md index d913d63..131c4de 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/1technophile/OpenMQTTGateway.svg?branch=master)](https://travis-ci.org/1technophile/OpenMQTTGateway) + See wiki for more info https://github.com/1technophile/OpenMQTTGateway/wiki