sudo: false
language: bash
os:
  - linux

script:
  - wget -O arduino.tar.xz https://www.arduino.cc/download.php?f=/arduino-nightly-linux64.tar.xz
  - tar xf arduino.tar.xz
  - mv arduino-nightly $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 tests/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
