aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
blob: 35e3809624fc997fa7f1554e2c42bee24f6b781f (plain)
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
sudo: required
dist: trusty

os: linux

language: c

compiler:
  - gcc
  - clang

env:
  matrix:
    - LUA=lua5.1-dev LUA_DEV=liblua5.1-dev LUA_INCLUDE_DIR=/usr/include/lua5.1 LUA_CMODULE_DIR=/lib LUALIB=-llua5.1
    - LUA=libluajit-5.1-dev LUA_DEV=libluajit-5.1-dev LUA_INCLUDE_DIR=/usr/include/luajit-2.0 LUA_CMODULE_DIR=/lib LUALIB=-lluajit-5.1

install:
    - sudo apt-get update
    - sudo apt-get install -qq -y $LUA luarocks cppcheck valgrind
    - sudo apt-get install -qq -y cpanminus libipc-run3-perl > build.log 2>&1 || (cat build.log && exit 1)
    - 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
  - cat build.log
  - grep -E '^==[0-9]+==' build.log; if [ "$?" == 0 ]; then exit 1; else exit 0; fi