mirror of
https://github.com/kikito/middleclass.git
synced 2024-11-25 02:44:20 +00:00
first attempt at making travis work with lua 5.3
This commit is contained in:
parent
4b366410bd
commit
417b042c8a
38
.travis.yml
38
.travis.yml
@ -1,35 +1,23 @@
|
||||
language: erlang
|
||||
language: c
|
||||
|
||||
env:
|
||||
global:
|
||||
- LUAROCKS_BASE=luarocks-2.0.9
|
||||
matrix:
|
||||
- LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
|
||||
- LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2
|
||||
- LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
|
||||
- LUA='Lua 5.1'
|
||||
- LUA='Lua 5.2'
|
||||
- LUA='Lua 5.3'
|
||||
- LUA='LuaJIT 2.0'
|
||||
|
||||
before_install:
|
||||
- if [ $LUA = "luajit" ]; then
|
||||
sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y;
|
||||
fi
|
||||
- sudo apt-get install $LUA
|
||||
- sudo apt-get install $LUA_DEV
|
||||
- lua$LUA_SFX -v
|
||||
# Install a recent luarocks release
|
||||
- wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz
|
||||
- tar zxvpf $LUAROCKS_BASE.tar.gz
|
||||
- cd $LUAROCKS_BASE
|
||||
- ./configure
|
||||
--lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR"
|
||||
- sudo make
|
||||
- sudo make install
|
||||
- cd $TRAVIS_BUILD_DIR
|
||||
- bash .travis_setup.sh
|
||||
|
||||
install:
|
||||
- sudo -E luarocks install busted
|
||||
- sudo apt-get update -qq
|
||||
- sudo luarocks install busted
|
||||
|
||||
script:
|
||||
- sudo -E busted -v
|
||||
script: busted
|
||||
|
||||
branches:
|
||||
except:
|
||||
- gh-pages
|
||||
|
||||
notifications:
|
||||
email:
|
||||
|
44
.travis_setup.sh
Normal file
44
.travis_setup.sh
Normal file
@ -0,0 +1,44 @@
|
||||
# A script for setting up environment for travis-ci testing.
|
||||
# Sets up Lua and Luarocks.
|
||||
# LUA must be "Lua 5.1", "Lua 5.2", "Lua 5.3" or "LuaJIT 2.0".
|
||||
|
||||
set -e
|
||||
|
||||
echo 'rocks_servers = {
|
||||
"http://rocks.moonscript.org/",
|
||||
"http://luarocks.org/repositories/rocks",
|
||||
"http://luarocks.logiceditor.com/rocks",
|
||||
"http://liblua.so/luarocks/repositories/rocks"
|
||||
}' >> ~/config.lua
|
||||
|
||||
|
||||
if [ "$LUA" == "LuaJIT 2.0" ]; then
|
||||
wget -O - http://luajit.org/download/LuaJIT-2.0.3.tar.gz | tar xz
|
||||
cd LuaJIT-2.0.3
|
||||
make && sudo make install INSTALL_TSYMNAME=lua;
|
||||
else
|
||||
if [ "$LUA" == "Lua 5.1" ]; then
|
||||
wget -O - http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
|
||||
cd lua-5.1.5;
|
||||
elif [ "$LUA" == "Lua 5.2" ]; then
|
||||
wget -O - http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz
|
||||
cd lua-5.2.4;
|
||||
elif [ "$LUA" == "Lua 5.3" ]; then
|
||||
wget -O - http://www.lua.org/ftp/lua-5.3.0.tar.gz | tar xz
|
||||
cd lua-5.3.0;
|
||||
fi
|
||||
sudo make linux install;
|
||||
fi
|
||||
|
||||
cd ..
|
||||
wget -O - http://luarocks.org/releases/luarocks-2.2.2.tar.gz | tar xz || wget -O - http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2.tar.gz | tar xz
|
||||
cd luarocks-2.2.2
|
||||
|
||||
if [ "$LUA" == "LuaJIT 2.0" ]; then
|
||||
./configure --with-lua-include=/usr/local/include/luajit-2.0;
|
||||
else
|
||||
./configure;
|
||||
fi
|
||||
|
||||
make && sudo make install
|
||||
cd ..
|
Loading…
Reference in New Issue
Block a user