parent
a01669693e
commit
b67e0a123c
24
.travis.yml
24
.travis.yml
|
@ -1,5 +1,4 @@
|
||||||
sudo: required
|
dist: xenial
|
||||||
dist: trusty
|
|
||||||
language: c
|
language: c
|
||||||
|
|
||||||
# Build only master and stable branches. Other branches go through PRs.
|
# Build only master and stable branches. Other branches go through PRs.
|
||||||
|
@ -11,8 +10,7 @@ branches:
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- LUA=5.2 LUANAME=lua5.2 DO_COVERAGE=coveralls
|
- LUA=5.2 LUANAME=lua5.2 DO_COVERAGE=coveralls
|
||||||
# Lua 5.3 isn't available in Ubuntu Trusty, so some magic below installs it.
|
- LUA=5.3 LUANAME=lua5.3 DO_COVERAGE=codecov
|
||||||
- LUA=5.3 LUANAME=lua5.3 LUALIBRARY=/usr/lib/liblua.so DO_COVERAGE=codecov
|
|
||||||
# luajit: installed from source.
|
# luajit: installed from source.
|
||||||
- LUA=5.1 LUANAME=luajit-2.0 LUALIBRARY=/usr/lib/libluajit-5.1.so LUAROCKS_ARGS=--lua-suffix=jit-2.0.5 TEST_PREV_COMMITS=1
|
- LUA=5.1 LUANAME=luajit-2.0 LUALIBRARY=/usr/lib/libluajit-5.1.so LUAROCKS_ARGS=--lua-suffix=jit-2.0.5 TEST_PREV_COMMITS=1
|
||||||
# Note: luarocks does not work with Lua 5.0.
|
# Note: luarocks does not work with Lua 5.0.
|
||||||
|
@ -54,21 +52,10 @@ install:
|
||||||
./autogen.sh --prefix=/usr
|
./autogen.sh --prefix=/usr
|
||||||
make && sudo make install)
|
make && sudo make install)
|
||||||
|
|
||||||
# Install Lua (per env).
|
# Install Lua (per env).
|
||||||
# Note that Lua 5.3 is installed manually, because it is not available in Ubuntu Trusty.
|
|
||||||
- |
|
- |
|
||||||
set -e
|
set -e
|
||||||
if [[ "$LUA" == "5.3" ]]; then
|
if [[ "$LUANAME" == "luajit-2.0" ]]; then
|
||||||
(echo '#!/bin/sh' ; echo 'set -x' ; echo 'gcc -shared -Wl,--no-undefined -o "$@" -ldl -lm') > /tmp/myar
|
|
||||||
chmod a+x /tmp/myar
|
|
||||||
(cd /tmp
|
|
||||||
wget http://www.lua.org/ftp/lua-5.3.4.tar.gz -O lua.tar.gz
|
|
||||||
tar -xvzf lua.tar.gz
|
|
||||||
cd lua-5.3.*/src \
|
|
||||||
&& make SYSCFLAGS="-DLUA_USE_LINUX -ULUA_COMPAT_5_2 -DLUA_USE_APICHECK -Dlua_assert=assert" SYSLIBS="-Wl,-E -ldl -lreadline" LUA_A=liblua.so MYCFLAGS="-fPIC" RANLIB=: AR="/tmp/myar" liblua.so \
|
|
||||||
&& cd .. \
|
|
||||||
&& sudo make INSTALL_TOP=/usr/ INSTALL_INC=${LUAINCLUDE} TO_LIB=liblua.so linux install)
|
|
||||||
elif [[ "$LUANAME" == "luajit-2.0" ]]; then
|
|
||||||
(wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz -O- | tar xzf - -C /tmp
|
(wget http://luajit.org/download/LuaJIT-2.0.5.tar.gz -O- | tar xzf - -C /tmp
|
||||||
cd /tmp/LuaJIT-*
|
cd /tmp/LuaJIT-*
|
||||||
sudo make install PREFIX=/usr)
|
sudo make install PREFIX=/usr)
|
||||||
|
@ -77,7 +64,10 @@ install:
|
||||||
if [ ! -e "/usr/bin/lua" ]; then sudo ln -s /usr/bin/luajit /usr/bin/lua; fi
|
if [ ! -e "/usr/bin/lua" ]; then sudo ln -s /usr/bin/luajit /usr/bin/lua; fi
|
||||||
else
|
else
|
||||||
sudo apt-get install -y lib${LUANAME}-dev ${LUANAME} ${INSTALL_PKGS}
|
sudo apt-get install -y lib${LUANAME}-dev ${LUANAME} ${INSTALL_PKGS}
|
||||||
|
# lua5.3 does not install /usr/bin/lua, but lua5.1/lua5.2 do.
|
||||||
|
if [ ! -e "/usr/bin/lua" ]; then sudo ln -s /usr/bin/${LUANAME} /usr/bin/lua; fi
|
||||||
fi
|
fi
|
||||||
|
- lua -v
|
||||||
|
|
||||||
# Install luarocks (for the selected Lua version).
|
# Install luarocks (for the selected Lua version).
|
||||||
- |
|
- |
|
||||||
|
|
Loading…
Reference in New Issue