-
Notifications
You must be signed in to change notification settings - Fork 46
/
.travis.yml
103 lines (91 loc) · 3.12 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
94
95
96
97
98
99
100
101
102
103
language: c
env:
global:
- LUAROCKS=2.2.1
matrix:
# You can set PERF only for luajit/ffi
# todo: install libffi and test ffi binding on Lua 5.1/5.2
- LUA=lua5.1 ZMQ_VER=3.2 LZMQ=lzmq PERF="NO"
- LUA=lua5.1 ZMQ_VER=4.0 LZMQ=lzmq PERF="NO"
- LUA=lua5.1 ZMQ_VER=4.1 LZMQ=lzmq PERF="NO"
- LUA=lua5.2 ZMQ_VER=4.1 LZMQ=lzmq PERF="NO"
- LUA=lua5.3 ZMQ_VER=4.1 LZMQ=lzmq PERF="NO"
- LUA=luajit ZMQ_VER=4.1 LZMQ=lzmq PERF="NO"
- LUA=lua5.1 ZMQ_VER=4.2 LZMQ=lzmq PERF="NO"
- LUA=luajit ZMQ_VER=3.2 LZMQ=ffi-lua PERF="NO"
- LUA=luajit ZMQ_VER=4.0 LZMQ=ffi-lua PERF="NO"
- LUA=luajit ZMQ_VER=4.1 LZMQ=ffi-lua PERF="NO"
- LUA=luajit ZMQ_VER=4.2 LZMQ=ffi-lua PERF="NO"
# - LUA=luajit ZMQ_VER=3.2 LZMQ=ffi PERF="NO"
# - LUA=luajit ZMQ_VER=4.0 LZMQ=ffi PERF="NO"
# - LUA=luajit ZMQ_VER=4.1 LZMQ=ffi PERF="NO"
# - LUA=luajit ZMQ_VER=4.2 LZMQ=ffi PERF="NO"
branches:
only:
- master
before_install:
- bash .travis/setup_lua.sh
- if [ "$ZMQ_VER" == "4.1" ]; then
bash .travis/setup_sodium.sh;
fi
- if [ "$ZMQ_VER" == "4.2" ]; then
bash .travis/setup_sodium.sh;
fi
- bash .travis/setup_zmq.sh
install:
- sudo pip install cpp-coveralls
- sudo luarocks install luafilesystem
- sudo luarocks install lua-path
- sudo luarocks install luacov-coveralls
- sudo luarocks install lua-llthreads2
- sudo luarocks install lunitx
- sudo luarocks install luasocket
- if [ $LZMQ = "ffi-lua" ]; then
sudo luarocks install ljsyscall 0.9;
fi
- if [ $LZMQ = "ffi-lua" ]; then
sudo luarocks make rockspecs/lzmq-ffi-scm-0.rockspec;
else
sudo luarocks make rockspecs/lzmq-scm-0.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage";
fi
script:
- cd test
- lunit.sh utest.lua
- lunit.sh test_proxy.lua
- lua -lluacov test_threads.lua
- lua -lluacov test_threads_arg.lua
- lua -lluacov test_threads_opt.lua
- lua -lluacov test_threads_fork_arg.lua
- lua -lluacov test_threads_fork.lua
- lua -lluacov test_threads_fork_opt.lua
- lua -lluacov test_threads_file.lua
- lua -lluacov test_threads_actor.lua
- lua -lluacov test_threads_actor_poll.lua
- lua -lluacov test_threads_sync.lua
- lua -lluacov test_metadata.lua
#- if [ "$ZMQ_VER" == "libzmq" ]; then
# lua test_req_relaxed.lua;
# fi
- if [ $PERF = "YES" ]; then
cd $TRAVIS_BUILD_DIR;
mkdir ./examples/perf2/libzmq;
sudo cp ./libzmq/perf/inproc_lat ./examples/perf2/libzmq/;
sudo cp ./libzmq/perf/inproc_thr ./examples/perf2/libzmq/;
cd ./examples/perf2;
sudo luajit runner.lua;
fi
after_success:
- cd $TRAVIS_BUILD_DIR
- cd test
- if [ $LZMQ = "ffi-lua" ]; then
luacov-coveralls -c .luacov.ffi;
elif [ $LZMQ = "ffi" ]; then
luacov-coveralls;
else
coveralls -i src -e src/lzutils.c -b .. -r .. --dump c.report.json;
luacov-coveralls -j c.report.json;
fi
notifications:
email:
on_success: change
on_failure: always