diff options
author | Alexey Melnichuk <mimir@newmail.ru> | 2014-02-04 13:50:30 +0400 |
---|---|---|
committer | Alexey Melnichuk <mimir@newmail.ru> | 2014-02-04 13:50:30 +0400 |
commit | 04b76ad26888761d7bdbc782892332a6075dd773 (patch) | |
tree | 69127427f0261cda32573b9940e7afbd3aa53423 | |
parent | cef9a7a112a8322e2c6498021df59e4a8f7b5246 (diff) | |
download | lua-llthreads2-04b76ad26888761d7bdbc782892332a6075dd773.tar.gz lua-llthreads2-04b76ad26888761d7bdbc782892332a6075dd773.tar.bz2 lua-llthreads2-04b76ad26888761d7bdbc782892332a6075dd773.zip |
Change travis files.
-rw-r--r-- | .travis.yml | 32 | ||||
-rw-r--r-- | .travis/setup_lua.sh | 35 |
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 | ||
3 | env: | 3 | env: |
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 | ||
15 | branches: | 12 | branches: |
16 | only: | 13 | only: |
17 | - master | 14 | - master |
18 | 15 | ||
19 | before_install: | 16 | before_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 | ||
41 | install: | 19 | install: |
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 | |||
6 | if [ "$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; | ||
11 | else | ||
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; | ||
21 | fi | ||
22 | |||
23 | LUAROCKS_BASE=luarocks-$LUAROCKS_VER | ||
24 | curl http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz | ||
25 | cd $LUAROCKS_BASE; | ||
26 | |||
27 | if [ "$LUA" == "luajit" ]; then | ||
28 | ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0; | ||
29 | else | ||
30 | ./configure; | ||
31 | fi | ||
32 | |||
33 | make && sudo make install | ||
34 | |||
35 | cd $TRAVIS_BUILD_DIR \ No newline at end of file | ||