summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Melnichuk <mimir@newmail.ru>2014-02-04 13:50:30 +0400
committerAlexey Melnichuk <mimir@newmail.ru>2014-02-04 13:50:30 +0400
commit04b76ad26888761d7bdbc782892332a6075dd773 (patch)
tree69127427f0261cda32573b9940e7afbd3aa53423
parentcef9a7a112a8322e2c6498021df59e4a8f7b5246 (diff)
downloadlua-llthreads2-04b76ad26888761d7bdbc782892332a6075dd773.tar.gz
lua-llthreads2-04b76ad26888761d7bdbc782892332a6075dd773.tar.bz2
lua-llthreads2-04b76ad26888761d7bdbc782892332a6075dd773.zip
Change travis files.
-rw-r--r--.travis.yml32
-rw-r--r--.travis/setup_lua.sh35
2 files changed, 40 insertions, 27 deletions
diff --git a/.travis.yml b/.travis.yml
index dc2ef16..645c612 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,41 +2,19 @@ language: erlang
2 2
3env: 3env:
4 global: 4 global:
5 - PLATFORM=linux
5 - LUAROCKS_VER=2.1.0 6 - LUAROCKS_VER=2.1.0
6 - LUAROCKS_BASE=luarocks-$LUAROCKS_VER
7 - LUAROCKS_INSTALL=wget
8 - LUAROCKS_GITTAG=master
9 # - LUAROCKS_GITTAG=v$LUAROCKS_VER
10 matrix: 7 matrix:
11 - LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1 8 - LUA=lua5.1 LUA_SFX=
12 - LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2 9 - LUA=lua5.2 LUA_SFX=
13 - LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0 10 - LUA=luajit LUA_SFX=jit
14 11
15branches: 12branches:
16 only: 13 only:
17 - master 14 - master
18 15
19before_install: 16before_install:
20 - if [ $LUA = "luajit" ]; then 17 - bash .travis/setup_lua.sh
21 sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y;
22 fi
23 - sudo apt-get install $LUA
24 - sudo apt-get install $LUA_DEV
25 - lua$LUA_SFX -v
26 # Install a recent luarocks release
27 - if [ $LUAROCKS_INSTALL = "git" ]; then
28 git clone https://github.com/keplerproject/luarocks.git;
29 cd luarocks;
30 git checkout $LUAROCKS_GITTAG;
31 else
32 wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz;
33 tar zxvpf $LUAROCKS_BASE.tar.gz;
34 cd $LUAROCKS_BASE;
35 fi
36 - ./configure --lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR"
37 - sudo make
38 - sudo make install
39 - cd $TRAVIS_BUILD_DIR
40 18
41install: 19install:
42 - sudo luarocks install lunitx 20 - sudo luarocks install lunitx
diff --git a/.travis/setup_lua.sh b/.travis/setup_lua.sh
new file mode 100644
index 0000000..47ce49c
--- /dev/null
+++ b/.travis/setup_lua.sh
@@ -0,0 +1,35 @@
1# A script for setting up environment for travis-ci testing.
2# Sets up Lua and Luarocks.
3# LUA must be "lua5.1", "lua5.2" or "luajit".
4# PLATFORM must be "linux" or "macosx".
5
6if [ "$LUA" == "luajit" ]; then
7 curl http://luajit.org/download/LuaJIT-2.0.2.tar.gz | tar xz
8 cd LuaJIT-2.0.2
9 make && sudo make install
10 cd $TRAVIS_BUILD_DIR;
11else
12 if [ "$LUA" == "lua5.1" ]; then
13 curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
14 cd lua-5.1.5;
15 elif [ "$LUA" == "lua5.2" ]; then
16 curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz
17 cd lua-5.2.3;
18 fi
19 sudo make $PLATFORM install
20 cd $TRAVIS_BUILD_DIR;
21fi
22
23LUAROCKS_BASE=luarocks-$LUAROCKS_VER
24curl http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz
25cd $LUAROCKS_BASE;
26
27if [ "$LUA" == "luajit" ]; then
28 ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0;
29else
30 ./configure;
31fi
32
33make && sudo make install
34
35cd $TRAVIS_BUILD_DIR \ No newline at end of file