This repository has been archived by the owner on Jul 19, 2019. It is now read-only.
forked from jgromes/RadioLib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (49 loc) · 1.61 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
52
53
54
env:
global:
# keep Arduino IDE version at 1.8.1 until https://github.com/per1234/arduino-ci-script/issues/1 is resolved
- ARDUINO_IDE_VERSION="1.8.1"
matrix:
- BOARD="arduino:avr:uno"
- BOARD="arduino:avr:leonardo"
- BOARD="arduino:avr:mega:cpu=atmega2560"
before_install:
# install Arduino IDE
- wget http://downloads.arduino.cc/arduino-$ARDUINO_IDE_VERSION-linux64.tar.xz
- tar xf arduino-$ARDUINO_IDE_VERSION-linux64.tar.xz
- mv arduino-$ARDUINO_IDE_VERSION $HOME/arduino-ide
- export PATH=$PATH:$HOME/arduino-ide
# create directory to save the library and create symbolic link
install:
- mkdir -p $HOME/Arduino/libraries
- ln -s $PWD $HOME/Arduino/libraries/RadioLib
# only build the master branch
branches:
only:
- master
script:
# build all example sketches
- for example in $(find $PWD/examples -name '*.ino' | sort); do
echo -e "\n\033[1;33mBuilding ${example##*/} ... \033[0m";
arduino --verify --board $BOARD $example;
if [ $? -ne 0 ]; then
echo -e "\033[1;31m${example##*/} build FAILED\033[0m\n";
exit 1;
else
echo -e "\033[1;32m${example##*/} build PASSED\033[0m\n";
fi
done
# generate Doxygen documentation (only for Arduino UNO)
- if [ $BOARD = "arduino:avr:uno" ]; then
sudo apt-get update;
sudo apt-get install -y doxygen;
doxygen Doxyfile;
fi
# deploy Doxygen docs on master branch and only when building for Arduino UNO
deploy:
provider: pages
skip_cleanup: true
local_dir: docs/html
github_token: $GH_REPO_TOKEN
on:
branch: master
condition: $BOARD = "arduino:avr:uno"