forked from luaposix/luaposix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (64 loc) · 2.59 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
# Lua is not officially supported, but an erlang environment will do.
language: erlang
env:
global:
- PACKAGE=luaposix
- ROCKSPEC=$PACKAGE-git-1.rockspec
- LUAROCKS_CONFIG=build-aux/luarocks-config.lua
- LUAROCKS_BASE=luarocks-2.1.2
- LUAROCKS="$LUA $HOME/bin/luarocks"
matrix:
- LUA=lua5.1 LUA_INCDIR=/usr/include/lua5.1 LUA_SUFFIX=5.1
- LUA=lua5.2 LUA_INCDIR=/usr/include/lua5.2 LUA_SUFFIX=5.2
- LUA=luajit-2.0.0-beta9 LUA_INCDIR=/usr/include/luajit-2.0 LUA_SUFFIX=5.1
# Tool setup.
install:
# Put back the links for libyaml, which are missing on recent Travis VMs
- test -f /usr/lib/libyaml.so ||
sudo find /usr/lib -name 'libyaml*' -exec ln -s {} /usr/lib \;
- sudo apt-get install help2man
- sudo apt-get install luajit
- sudo apt-get install libluajit-5.1-dev
- sudo apt-get install lua5.1
- sudo apt-get install liblua5.1-dev
- sudo apt-get install lua5.2
- sudo apt-get install liblua5.2-dev
# Install a recent luarocks release locally for everything else.
- wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz
- tar zxvpf $LUAROCKS_BASE.tar.gz
# LuaRocks configure --with-lua argument is just a prefix!
- ( cd $LUAROCKS_BASE;
./configure
--prefix=$HOME --with-lua=/usr --lua-version=$LUA_SUFFIX
--lua-suffix=$LUA_SUFFIX --with-lua-include=$LUA_INCDIR;
make build;
make install; )
# Configure and build.
script:
# Initial bootstrap to build luarocks-config.lua, before we've
# installed our rocks.
- ./bootstrap --skip-rock-checks
- ./configure LUA="$LUA"
- make $LUAROCKS_CONFIG
LUA="$LUA" LUA_INCDIR="$LUA_INCDIR" V=1
|| cat $LUAROCKS_CONFIG config.log
# Set Lua and Shell paths up for local luarocks tree.
# this package depends on will be installed.
- eval `$LUAROCKS path`
- export PATH=`pwd`/luarocks/bin:$PATH
# Install extra rocks into $LUAROCKS_CONFIG rocks tree.
- $LUAROCKS install lyaml; $LUAROCKS install ldoc; $LUAROCKS install specl;
# Make git rockspec for this luaposix
- make rockspecs LUAROCKS="$LUAROCKS" V=1
|| { $LUAROCKS path; cat $ROCKSPEC; }
# The git rockspec will rerun bootstrap, and check any rock versions
# in bootstrap.conf:buildreq this time.
- $LUAROCKS make $ROCKSPEC LUA="$LUA"
# Run self-tests in the `luarocks make` build tree.
- LUA_PATH=`pwd`'/lib/?.lua;'"${LUA_PATH-;}"
LUA_CPATH=`pwd`'/ext/?.so;'"${LUA_CPATH-;}"
LUA_INIT= LUA_INIT_5_2=
make check V=1
# Run sanity checks
- echo 'local-checks-to-skip = sc_vulnerable_makefile_CVE-2012-3386' >> build-aux/sanity-cfg.mk
- make syntax-check