2018-10-18 20:05:41 +00:00
|
|
|
language: C
|
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- IDE_VERSION=1.8.1
|
|
|
|
matrix:
|
|
|
|
include:
|
2018-10-18 21:03:19 +00:00
|
|
|
- name: "WS2812B"
|
2018-10-18 20:05:41 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
# Install Arduino IDE
|
|
|
|
- wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
|
|
|
|
- tar xf arduino-$IDE_VERSION-linux64.tar.xz
|
|
|
|
- sudo mv arduino-$IDE_VERSION /usr/local/share/arduino
|
|
|
|
- sudo ln -s /usr/local/share/arduino/arduino /usr/local/bin/arduino
|
|
|
|
|
|
|
|
# Install Libraries
|
|
|
|
- arduino --install-library "FastLED:3.2.0"
|
|
|
|
|
|
|
|
# Sketch Compiling Functions
|
2018-10-18 21:03:19 +00:00
|
|
|
- CYAN="\033[36m"; YELLOW="\033[33m"; NOC="\033[0m";
|
2018-10-18 20:05:41 +00:00
|
|
|
- buildSketchPath() {
|
|
|
|
echo -e "\n${CYAN}Building sketch ${1##*/}${NOC}";
|
|
|
|
arduino --verify --board $BOARD "$1";
|
|
|
|
}
|
|
|
|
- buildAllSketches() {
|
|
|
|
for f in $(find $PWD -name '*.ino');
|
|
|
|
do
|
|
|
|
buildSketchPath $f;
|
|
|
|
done;
|
|
|
|
}
|
2018-10-18 21:03:19 +00:00
|
|
|
- buildBoard() {
|
|
|
|
export BOARD="$1";
|
|
|
|
echo -e "\n${YELLOW}Now using board $BOARD${NOC}";
|
|
|
|
buildAllSketches;
|
|
|
|
}
|
2018-10-18 20:05:41 +00:00
|
|
|
|
|
|
|
script:
|
2018-10-18 21:03:19 +00:00
|
|
|
- buildBoard "arduino:avr:uno"
|
|
|
|
- buildBoard "arduino:avr:nano:cpu=atmega328"
|
|
|
|
- buildBoard "arduino:avr:leonardo"
|
|
|
|
- buildBoard "arduino:avr:mega:cpu=atmega2560"
|
2018-10-18 20:05:41 +00:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: change
|
|
|
|
on_failure: change
|