-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
43 lines (35 loc) · 1.37 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
sudo: required
dist: focal
branches:
only:
- "master"
os: linux
language: c
compiler:
- gcc
env:
matrix:
- LUA=1 LUA_INCLUDE_DIR=/usr/include/lua5.1 LUA_CMODULE_DIR=/usr/lib/lua/5.1 LUALIB=-llua5.1
- LUAJIT=1 LUAJIT_PREFIX=/usr/local LUA_INCLUDE_DIR=/usr/local/include/luajit-2.1 LUA_CMODULE_DIR=/usr/lib/lua/5.1 LUALIB=-lluajit-5.1
before_install:
- git clone /~https://github.com/openresty/lua-cjson.git
install:
- >
if [ -n "$LUAJIT" ]; then
git clone -b v2.1-agentzh /~https://github.com/openresty/luajit2.git ../luajit2
pushd ../luajit2 || exit 1
make -j$JOBS CCDEBUG=-g Q= PREFIX=$LUAJIT_PREFIX CC=$CC XCFLAGS='-DLUA_USE_APICHECK -DLUA_USE_ASSERT'
sudo make install > build.log 2>&1 || (cat build.log && exit 1)
popd || exit 1
fi
- >
if [ -n "$LUA" ]; then
sudo apt-get install -qq -y liblua5.1-dev
fi
- sudo apt-get install -qq -y 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)
- cd lua-cjson/ && make && sudo make install && cd ..
- make test valtest