-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
53 lines (47 loc) · 1.44 KB
/
.travis.yml
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
language: generic
env:
global:
- IDE_VERSION=1.8.9
matrix:
- BOARD="arduino:samd:mkrzero"
before_install:
- wget http://downloads.arduino.cc/arduino-$IDE_VERSION-linux64.tar.xz
- tar xf arduino-$IDE_VERSION-linux64.tar.xz
- mv arduino-$IDE_VERSION $HOME/arduino-ide
- export PATH=$PATH:$HOME/arduino-ide
- if [[ "$BOARD" =~ "arduino:samd:" ]]; then
arduino --install-boards arduino:samd &> /dev/null;
fi
- buildExampleSketch() { arduino --verify --board $BOARD $1; }
- oldBuildExampleSketch() { arduino --verify --board $BOARD $PWD/examples/$1/$1.ino; }
- badBuildExampleSketch() { arduino --verify --board $BOARD $PWD/examples/tempBad/$1/$1.ino; }
- |
buildAllExamples(){
declare -a failureList=()
local failureNum=0
shopt -s globstar
for i in $PWD/examples/**/*.ino; do
echo $i
buildExampleSketch $i
exit_status=$?
if [ $exit_status != 0 ]; then
failureNum=$((failureNum + 1))
echo Failure Building: $i
failureList+=($i)
else
echo Build Successful: $i
fi
done
echo
echo
echo $failureNum total build failures
for i in "${failureList[@]}"; do
echo Failed to build: $i
done
return $failureNum;
}
install:
- mkdir -p $HOME/Arduino/libraries
- ln -s $PWD $HOME/Arduino/libraries/travisTesting
script:
- buildAllExamples