forked from openresty/lua-cjson
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (33 loc) · 943 Bytes
/
.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
sudo: required
dist: trusty
os: linux
language: c
compiler:
- gcc
- clang
addons:
apt:
packages:
- luarocks
- cppcheck
- valgrind
- cpanminus
- libipc-run3-perl
- lua5.1-dev
- libluajit-5.1-dev
cache:
apt: true
env:
matrix:
- LUA_DEV=liblua5.1-dev LUA_INCLUDE_DIR=/usr/include/lua5.1 LUA_CMODULE_DIR=/lib LUALIB=-llua5.1
- LUA_DEV=libluajit-5.1-dev LUA_INCLUDE_DIR=/usr/include/luajit-2.0 LUA_CMODULE_DIR=/lib LUALIB=-lluajit-5.1
install:
- sudo cpanm --notest Test::Base Test::LongString > build.log 2>&1 || (cat build.log && exit 1)
script:
- cppcheck --force --error-exitcode=1 --enable=warning . > build.log 2>&1 || (cat build.log && exit 1)
- sh runtests.sh
- make
- prove -Itests tests
- TEST_LUA_USE_VALGRIND=1 prove -Itests tests > build.log 2>&1; export e=$?
- cat build.log
- grep -E '^==[0-9]+==' build.log; if [ "$?" == 0 ]; then exit 1; else exit $e; fi