-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
93 lines (73 loc) · 4.62 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
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
87
88
89
90
91
92
93
sudo: required
services:
- docker
# Blacklist
branches:
except:
- gh-pages
before_install:
# set timezone
- export TZ=Asia/Taipei
# get latest git tag
- export GIT_TAG=` git describe --abbrev=0 --tags`
install:
# login to dockerhub
- docker login --email=$DOCKER_HUB_EMAIL --username=takawang --password=$DOCKER_HUB_PASSWORD
# Install dependencies
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
script:
### build modbus slave server image
- docker build -t $MODBUS_SERVER_IMG tests/mbserver/.
- if [ ! -z "$TRAVIS_TAG" ]; then docker tag $MODBUS_SERVER_IMG:latest $MODBUS_SERVER_IMG:$TRAVIS_TAG; fi && docker push $MODBUS_SERVER_IMG
### build zclient image
- docker build -t $MODBUS_ZCLIENT_IMG tests/zclient/.
- if [ ! -z "$TRAVIS_TAG" ]; then docker tag $MODBUS_ZCLIENT_IMG:latest $MODBUS_ZCLIENT_IMG:$TRAVIS_TAG; fi && docker push $MODBUS_ZCLIENT_IMG
### build modbusd image
- docker build -t $MODBUSD_IMG .
- if [ ! -z "$TRAVIS_TAG" ]; then docker tag $MODBUSD_IMG:latest $MODBUSD_IMG:$TRAVIS_TAG; fi && docker push $MODBUSD_IMG
### run modbus slave server
- docker run -itd --name=$MODBUS_SERVER_NAME $MODBUS_SERVER_IMG
### run modbusd
#- docker run -v /tmp:/tmp --link $MODBUS_SERVER_NAME -itd --name=$MODBUSD_NAME $MODBUSD_IMG /bin/sh -c "valgrind --log-file="/tmp/valgrind.log" --tool=memcheck --leak-check=full --show-leak-kinds=all --verbose /usr/bin/modbusd /etc/modbusd/modbusd.json"
- docker run -v /tmp:/tmp --link $MODBUS_SERVER_NAME -itd --name=$MODBUSD_NAME $MODBUSD_IMG
### run zclient
- docker run -v /tmp:/tmp --link $MODBUS_SERVER_NAME -it --name=$MODBUS_ZCLIENT_NAME $MODBUS_ZCLIENT_IMG /bin/sh -c "node client3"
### print valgrind
#- docker run -v /tmp:/tmp -it --name=$VALGRIND_NAME $MODBUS_ZCLIENT_IMG /bin/sh -c "cat /tmp/valgrind.log"
### stop all containers
#- docker stop $MODBUS_SERVER_NAME $MODBUSD_NAME $VALGRIND_NAME
- docker stop $MODBUS_SERVER_NAME $MODBUSD_NAME
after_success:
- cd $TRAVIS_BUILD_DIR
- chmod +x gendoc.sh
- ./gendoc.sh
env:
global:
- GH_REPO_NAME: modbusd
- DOXYFILE: $TRAVIS_BUILD_DIR/Doxyfile
- GH_REPO_REF: github.com/taka-wang/modbusd.git
- MODBUS_SERVER_IMG=takawang/modbus-server
- MODBUS_ZCLIENT_IMG=takawang/modbus-zclient
- MODBUSD_IMG=takawang/modbusd
- MODBUS_SERVER_NAME=slave
- MODBUS_ZCLIENT_NAME=zclient
- MODBUSD_NAME=modbusd
- VALGRIND_NAME=valgrind
- secure: FrCMjU233KiRXywfBCe7xb366BtMgMrmghOd0YDa6u1d+gz32doLJ3oJJRvwJTBDUZeapmVe+cB09tK671m/P5fG/HeAfSR7CdDpBEMMzrZTUEkzduePlBv9lGYRujyxW8vhmApIXgcMhT3CRCMaibaFbRLYGCLnNuaRH2bn1/OJyjGkyxLwgHc8cUkkTaeauHqkd0XEPXIJgoPbuvmpY/53mfjjkx6nNmLUkju9o/qk9Ovss3EObEE5hMpAlvv0rf8EJsSQKf8clVutLH+qtdo65U2tEKOUhm4+3qCt5xRu44vgJirvd3J33RiRbpW/5Uw10eg5btCNUZhCl2K0ZSg/NeABNIIbhrCbxGSfVslSMtZn6kDdwbjOP8UD5eLk9WLVOf7Cg/l8KDEIaXToN7lSAQUu5eaRdu29kxJFGjIK5ZTRzN0wnysh1pI8nTfvRi/OavlwBbtdXdEmaj9JrrVOK8xlU0JSuGrhG84FX+GoK6GBVLlFjsQwwDtGty0WVT20T/LMhdNVKS5CK5FjBMc+mjtGpJefxGpC3E4yQPkcN7RRK4AqcNwjeY32AkxD5Qd3mvRTtX9WzlSZRYzfVI2o5GEfxs23qL30HRyuQDyhsgFJX8lMZW3umXj2su5CdRuaUZydi8anN2LoYlRfeZgDRoWBIR6uzSEw/G5dohE=
- secure: ms1BU9/+lqPgV9kfX6jahTU/tc8Yh3xlqSwEf03gkbjidas4qGQe5Xn43Ml2eeKNUd/zFSUxhxRBXYFoTx9Fk9ox5NP8pHyPd3bbCb5xWu6Zzs+2c0ITf3d3BcUd/haueue/jo7Sua5VeT255lKK1bzRgfQgyMqn/bUb3zMp/kCODHMRfq1Vge9d/V2918JSE9lqMabrpxAxPoV+vmCHpz1QVNnOoC2VcFA0dHctgp3ZEoSgvIuD+c47G/tulrT5F9fMhs3p4QO8vM7vIdkXsWZAbCTDQHpYIYkp5jwHqz6EqVaZgwU0NrrmhpRoxEyBzC+F9+ydYAhSuosvyzNwengFs5LxYDWsiO8YkuA/FIVEiKOYtuhhzqZ7jUHH0KTU3M27dHNgNBAPv9BMo/h33nU00d+f+81hkww30bQq8ssKG2jllsh60whM/TY9hc5gnBAV6eIYK0qnDND19jwoGKf5DM0NmfeodOaAZrgFBcp5kY8CM+t5s6NhES8v3hGsBT3NoSZiKvQcbw9vaMrKAqzdjbx5mou1H3m8Fdpvgi8pfchejSRHfNWEUWS9tJG1VajQGnylzTuLBKRvizIyabaJcdUsfOAXJia88L9xkRSbcOOp7IXQpeUQS+lQGjEORyk7Z0/hUUcH2Id9u5dOvC5yxB0unnUvqYgag0dWx58=
notifications:
email: false
hipchat:
on_success: always
rooms:
secure: aklONboOLgu63ji6MvOv6fkhMiL1lP5SBsq35iMfRdqFSrH7qzXEC8AHYvI71gjE19XRblNnWahinJVNGXih9Aw44JfZc7+/RlEZPNvnT3JCKwKYubwdure8mBuxE+04Eg0BNp9XLoVlw/RX9ejeCK90OkhKd3wBHuNwIWaqSYMSEEK1Ye95r4Rx62OH0n+yHnjmKULKM9+axFBIb6Kymz+lPIjb+hWNdmtDpGWwPpmUBomTY6PRaOS4KXMcuOlBlCqQmT4O7Z+uqjuXwg7LwWXhdwQeuPvCdwnT03ENahnuNVAFl6xbqYZnwyNd/9utzvOFwZLw7cqm5Im5IY7sl60Yi/DD00RZne5AibE3l81q33+rUY9+c8X4R6YlfzICrKwBL/7bhfhhFUHj2xlpmFnUc8mwebQg8xb+szNePQucyFrB+/Dcyyk/Hi3zmLhhGfsBWeA0bEVrknh/q8zLOMDrTQnc2uUr4Gn4lHYzDbQQgsuGrs6vV4KjJAD3Z9JQ+Z5OfITFuGVGLtGE5yY2pU9oLCKkpibNv/4gWqDkNKW0pwWLsJppi9lYuZe1ItnxkCwL3qJ33KEqHvVb5lvh9gDiBzzeuuuFewIadCQezwkE5hLLAw1QTqKjktz6JN1uTNE/1khgFYXNsSw6djhEh/eQieeA96QWL4QW9Jjr9eA=
template:
- "%{repository} (%{commit}) : %{message} %{foo} "
- "Build details: %{build_url}"