From efe073a03dd8871b050ad0847ec03801eff83f52 Mon Sep 17 00:00:00 2001 From: luc Date: Tue, 10 Nov 2015 20:24:35 +0800 Subject: [PATCH] Add travis tag for IDE 1.6.5 and Due 1.6.4 --- .travis.yml | 39 +++++++++++++++++++++++++++++++++++++++ command.sh | 19 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .travis.yml create mode 100644 command.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..206b63e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,39 @@ +sudo: false + +language: bash + +os: + - linux + +before_install: + - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16" + +before_script: + - "export DISPLAY=:99.0" + - sleep 3 # give xvfb some time to start + - wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz + - tar xf arduino-1.6.5-linux64.tar.xz + - mv arduino-1.6.5 $HOME/arduino_ide + - mkdir -p $HOME/.arduino15/packages/arduino/hardware/sam + - cd $HOME/.arduino15/packages/arduino/hardware/sam + - wget http://downloads.arduino.cc/cores/sam-1.6.4.tar.bz2 + - tar xf sam-1.6.4.tar.bz2 + - mkdir -p $HOME/.arduino15/packages/arduino/tools/arm-none-eabi-gcc + - cd $HOME/.arduino15/packages/arduino/tools/arm-none-eabi-gcc + - wget http://downloads.arduino.cc/gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz + - tar xf gcc-arm-none-eabi-4.8.3-2014q1-linux64.tar.gz + - mv gcc-arm-none-eabi-4.8.3-2014q1 4.8.3-2014q1 + + +script: + - cd $TRAVIS_BUILD_DIR + - source command.sh + - export PATH="$HOME/arduino_ide:$PATH" + - arduino --board arduino:sam:arduino_due_x --save-prefs + - arduino --get-pref sketchbook.path + - build_sketch src/ArduinoDUE/Repetier/Repetier.ino + +notifications: + email: + on_success: change + on_failure: change diff --git a/command.sh b/command.sh new file mode 100644 index 0000000..e366f20 --- /dev/null +++ b/command.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +function build_sketch() +{ + local sketch=$1 + + # buld sketch with arudino ide + echo -e "\n Build $sketch \n" + arduino --verbose --verify $sketch + + # get build result from arduino + local re=$? + + # check result + if [ $re -ne 0 ]; then + echo "Failed to build $sketch" + return $re + fi +}