forked from luaposix/luaposix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (57 loc) · 2.03 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
# 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.0.13
- LUAROCKS="$LUA $HOME/bin/luarocks"
- GENDOC=luarocks/bin/ldoc
- SPECL=bin/specl
matrix:
- LUA=lua5.1 LUA_INCDIR=/usr/include/lua5.1
- LUA=lua5.2 LUA_INCDIR=/usr/include/lua5.2
- LUA=luajit-2.0.0-beta9 LUA_INCDIR=/usr/include/luajit-2.0
# Tool setup.
install:
- 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
# Luadoc and Ldoc work best on Travis with Lua 5.1.
- sudo apt-get install luarocks
- sudo luarocks install ldoc
- mkdir -p luarocks/bin
- sed 's|^exec "[^"]*"|exec lua5.1|' `which ldoc` > $GENDOC
- chmod a+rx $GENDOC
# Install a recent luarocks release locally for everything else.
- wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz
- tar zxvpf $LUAROCKS_BASE.tar.gz
- cd $LUAROCKS_BASE
- ./configure
--prefix=$HOME --lua-version=5.1 --lua-suffix=5.1
--with-lua-include="/usr/include/lua5.1"
- make all install
- cd ..
# Configure and build.
script:
- ./bootstrap
- ./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.
- eval `$LUAROCKS path`
- export PATH=`pwd`/luarocks/bin:$PATH
- $LUAROCKS install lyaml; $LUAROCKS install specl;
- make rockspecs LUAROCKS="$LUAROCKS" V=1
|| { $LUAROCKS path; cat $ROCKSPEC; }
# LuaRocks make will fail if dependencies are missing.
- $LUAROCKS make $ROCKSPEC LUA="$LUA"
# Use bin/specl if we built it, or else the specl rock we just installed.
- test -f "$SPECL" || SPECL=luarocks/bin/specl;
make check SPECL="$SPECL" V=1