From 31a901cdda525ebac11853b7d36b3f0c64ed2abc Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 9 Dec 2015 13:54:50 +0200 Subject: [PATCH] Continuous Integration using @PlatformIO and @travis-ci MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi @ntruchsess, I see that your project contains the practical examples. All of us understand that it’s not easy to test them before each new commit to this repository. What is more, need to be sure that all of these examples are actual and compile without errors. I propose to solve this task using [Continuous integration](https://en.wikipedia.org/wiki/Continuous_integration) practice which is intended to detect [integration bugs](https://en.wikipedia.org/wiki/Software_testing#Integration_testing) and save time over the lifespan of a project. ## How does it work? The each new commit to this repository will be tested using existing examples with appropriate platforms/embedded boards. @PlatformIO is used here as cross-platform code builder and library manager in pair with @travis-ci (distributed continuous integration service). ## Quickstart Please enable @travis-ci following the steps 1, 2 and 5 here http://docs.travis-ci.com/user/getting-started/#To-get-started-with-Travis-CI%3A For more details please follow to: * Official Travis CI Documentation for PlatformIO: https://docs.travis-ci.com/user/integration/platformio/ * PlatformIO documentation for Travis CI: http://docs.platformio.org/en/latest/ci/travis.html ## Status Badge You can add [badge with build status](https://docs.travis-ci.com/user/status-images/) to your README **Markdown** ``` [![Build Status](https://travis-ci.org/ntruchsess/arduino_uip.svg?branch=master)](https://travis-ci.org/ntruchsess/arduino_uip) ``` **RST** ``` .. image:: https://travis-ci.org/ntruchsess/arduino_uip.svg?branch=master :target: https://travis-ci.org/ntruchsess/arduino_uip ``` ## Examples * Project [USB_Host_Shield_2.0](https://github.com/felis/USB_Host_Shield_2.0) [![Build Status](https://travis-ci.org/felis/USB_Host_Shield_2.0.svg?branch=master)](https://travis-ci.org/felis/USB_Host_Shield_2.0) * Project [Arduino-IRremote](https://github.com/z3t0/Arduino-IRremote) [![Build Status](https://travis-ci.org/z3t0/Arduino-IRremote.svg?branch=master)](https://travis-ci.org/z3t0/Arduino-IRremote) * Project [ethercard](https://github.com/jcw/ethercard) [![Build Status](https://travis-ci.org/jcw/ethercard.svg?branch=master)](https://travis-ci.org/jcw/ethercard) --- .travis.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1e538f9 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: python +python: + - "2.7" + +# Cache PlatformIO packages using Travis CI container-based infrastructure +sudo: false +cache: + directories: + - "~/.platformio" + +env: + - PLATFORMIO_CI_SRC=examples/AdvancedChatServer/AdvancedChatServer.ino + - PLATFORMIO_CI_SRC=examples/EchoServer/EchoServer.ino + - PLATFORMIO_CI_SRC=examples/TcpClient/TcpClient.ino + - PLATFORMIO_CI_SRC=examples/TcpServer/TcpServer.ino + - PLATFORMIO_CI_SRC=examples/UdpClient/UdpClient.ino + - PLATFORMIO_CI_SRC=examples/UdpServer/UdpServer.ino + +install: + - pip install -U platformio + +script: + - platformio ci --lib=. --board=uno --board=megaatmega1280