blob: d319201523099ca421a18409bf561449db6f5c74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
language: C
env:
global:
- IDE_VERSION=1.8.1
- IDE_LOCATION=/usr/local/share/arduino
- BOARDS_DESTINATION=$IDE_LOCATION/hardware
matrix:
include:
- name: "Blank Sketch"
env: SKETCH="$IDE_LOCATION/examples/01.Basics/BareMinimum/BareMinimum.ino"
- name: "USB API Demo"
env: SKETCH="$IDE_LOCATION/libraries/ArduinoXInput/extras/API-Demo/API-Demo.ino"
- name: "XInput Library"
env: SKETCH="$IDE_LOCATION/libraries/ArduinoXInput/examples/GamepadPins/GamepadPins.ino"
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 $IDE_LOCATION
- sudo ln -s $IDE_LOCATION/arduino /usr/local/bin/arduino
- rm arduino-$IDE_VERSION-linux64.tar.xz
# Install XInput Library
- if [[ $SKETCH == *"ArduinoXInput"* ]]; then
git clone https://github.com/dmadison/ArduinoXInput.git;
mv ArduinoXInput $IDE_LOCATION/libraries;
fi
# Sketch Compiling Functions
- CYAN="\033[36m"; NOC="\033[0m";
- buildSketch() {
echo -e "\n${CYAN}Building sketch ${SKETCH##*/} for $BOARD${NOC}";
arduino --verify --board $BOARD "$SKETCH";
}
install:
- mkdir $BOARDS_DESTINATION/xinput
- ln -s $PWD $BOARDS_DESTINATION/xinput/avr
script:
# Arduino Yún w/ XInput
- BOARD=xinput:avr:yun; buildSketch;
# Arduino Leonardo w/ XInput
- BOARD=xinput:avr:leonardo; buildSketch;
# Arduino Arduino Leonardo ETH w/ XInput
- BOARD=xinput:avr:leonardoeth; buildSketch;
# Arduino/Genuino Micro w/ XInput
- BOARD=xinput:avr:micro; buildSketch;
# Arduino Esplora w/ XInput
- BOARD=xinput:avr:esplora; buildSketch;
# LilyPad Arduino USB w/ XInput
- BOARD=xinput:avr:LilyPadUSB; buildSketch;
# Arduino Robot Control w/ XInput
- BOARD=xinput:avr:robotControl; buildSketch;
# Arduino Arduino Robot Motor w/ XInput
- BOARD=xinput:avr:robotMotor; buildSketch;
# Adafruit Circuit Playground 32u4 w/Caterina Configuration w/ XInput
- BOARD=xinput:avr:circuitplay32u4cat; buildSketch;
# Arduino Yún Mini w/ XInput
- BOARD=xinput:avr:yunmini; buildSketch;
# Arduino Industrial 101 w/ XInput
- BOARD=xinput:avr:chiwawa; buildSketch;
# Linino One w/ XInput
- BOARD=xinput:avr:one; buildSketch;
notifications:
email:
on_success: change
on_failure: change
|