forked from me-no-dev/ESPAsyncWebServer
give travis a go
This commit is contained in:
37
.travis.yml
Normal file
37
.travis.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
sudo: false
|
||||||
|
language: bash
|
||||||
|
os:
|
||||||
|
- linux
|
||||||
|
|
||||||
|
script:
|
||||||
|
- 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
|
||||||
|
- cd $HOME/arduino_ide/hardware
|
||||||
|
- mkdir esp8266com
|
||||||
|
- cd esp8266com
|
||||||
|
- ln -s $TRAVIS_BUILD_DIR esp8266
|
||||||
|
- cd esp8266/tools
|
||||||
|
- python get.py
|
||||||
|
- /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
|
||||||
|
- export PATH="$HOME/arduino_ide:$PATH"
|
||||||
|
- which arduino
|
||||||
|
- cd $TRAVIS_BUILD_DIR
|
||||||
|
- source travis/common.sh
|
||||||
|
- arduino --board esp8266com:esp8266:generic --save-prefs
|
||||||
|
- arduino --get-pref sketchbook.path
|
||||||
|
- install_libraries
|
||||||
|
- build_sketches arduino $TRAVIS_BUILD_DIR
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email:
|
||||||
|
on_success: change
|
||||||
|
on_failure: change
|
||||||
|
# webhooks:
|
||||||
|
# urls:
|
||||||
|
# - secure: "dnSY+KA7NK+KD+Z71copmANDUsyVePrZ0iXvXxmqMEQv+lp3j2Z87G5pHn7j0WNcNZrejJqOdbElJ9Q4QESRaAYxTR7cA6ameJeEKHiFJrQtN/4abvoXb9E1CxpL8aNON/xgnqCk+fycOK3nbWWXlJBodzBm7KN64vrcHO7et+M="
|
||||||
|
# on_success: change # options: [always|never|change] default: always
|
||||||
|
# on_failure: always # options: [always|never|change] default: always
|
||||||
|
# on_start: false # default: false
|
35
travis/common.sh
Executable file
35
travis/common.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function build_sketches()
|
||||||
|
{
|
||||||
|
local arduino=$1
|
||||||
|
local srcpath=$HOME/Arduino/libraries/ESPAsyncWebServer/examples
|
||||||
|
local sketches=$(find $srcpath -name *.ino)
|
||||||
|
for sketch in $sketches; do
|
||||||
|
local sketchdir=$(dirname $sketch)
|
||||||
|
if [[ -f "$sketchdir/.test.skip" ]]; then
|
||||||
|
echo -e "\n\n ------------ Skipping $sketch ------------ \n\n";
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo -e "\n\n ------------ Building $sketch ------------ \n\n";
|
||||||
|
$arduino --verify $sketch;
|
||||||
|
local result=$?
|
||||||
|
if [ $result -ne 0 ]; then
|
||||||
|
echo "Build failed ($1)"
|
||||||
|
return $result
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function install_libraries()
|
||||||
|
{
|
||||||
|
mkdir -p $HOME/Arduino/libraries
|
||||||
|
pushd $HOME/Arduino/libraries
|
||||||
|
|
||||||
|
# install ArduinoJson library
|
||||||
|
git clone https://github.com/bblanchon/ArduinoJson
|
||||||
|
git clone https://github.com/me-no-dev/ESPAsyncTCP
|
||||||
|
git clone https://github.com/me-no-dev/ESPAsyncWebServer
|
||||||
|
|
||||||
|
popd
|
||||||
|
}
|
Reference in New Issue
Block a user