aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Melnichuk <alexeymelnichuck@gmail.com>2016-09-05 16:23:18 +0300
committerAlexey Melnichuk <alexeymelnichuck@gmail.com>2016-09-05 16:23:18 +0300
commit60ae75bc02b6e319b9edaa03f1a70e478a9c2730 (patch)
tree4e2ba31c8c4cb1105096f681ad7ea63345a97189
parent6ed85312ce7f923dfb936000ea87f91d366cc49b (diff)
downloadlua-llthreads2-60ae75bc02b6e319b9edaa03f1a70e478a9c2730.tar.gz
lua-llthreads2-60ae75bc02b6e319b9edaa03f1a70e478a9c2730.tar.bz2
lua-llthreads2-60ae75bc02b6e319b9edaa03f1a70e478a9c2730.zip
Update Travis files.
-rw-r--r--.travis.yml37
-rw-r--r--.travis/platform.sh15
-rw-r--r--.travis/setup_lua.sh101
3 files changed, 25 insertions, 128 deletions
diff --git a/.travis.yml b/.travis.yml
index 779b236..335473d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,24 +1,36 @@
1language: c 1sudo: false
2 2
3env: 3matrix:
4 global: 4 include:
5 - LUAROCKS=2.2.0 5 - compiler: ": Lua51"
6 matrix: 6 env: LUA="lua 5.1"
7 - LUA=lua5.1 7 - compiler: ": Lua52"
8 - LUA=lua5.2 8 env: LUA="lua 5.2"
9 - LUA=lua5.3 9 - compiler: ": Lua53"
10 - LUA=luajit 10 env: LUA="lua 5.3"
11 - compiler: ": LuaJIT20"
12 env: LUA="luajit 2.0"
13 - compiler: ": LuaJIT21"
14 env: LUA="luajit 2.1"
15
16cache:
17 directories:
18 - here
19 - $HOME/.cache/pip
11 20
12branches: 21branches:
13 only: 22 only:
14 - master 23 - master
15 24
16before_install: 25before_install:
17 - bash .travis/setup_lua.sh 26 - export CC=gcc
27 - pip install --user hererocks
28 - hererocks here -r^ --$LUA;
29 - export PATH=$PATH:$PWD/here/bin
18 30
19install: 31install:
20 - sudo luarocks make rockspecs/lua-llthreads2-compat-scm-0.rockspec 32 - luarocks make rockspecs/lua-llthreads2-compat-scm-0.rockspec
21 - sudo luarocks make rockspecs/lua-llthreads2-scm-0.rockspec 33 - luarocks make rockspecs/lua-llthreads2-scm-0.rockspec
22 34
23script: 35script:
24 - cd test 36 - cd test
@@ -39,6 +51,7 @@ script:
39 - lua test_threads_ex_opt.lua 51 - lua test_threads_ex_opt.lua
40 - lua test_threads_ex_opt_2.lua 52 - lua test_threads_ex_opt_2.lua
41 - lua test_threads_attr.lua 53 - lua test_threads_attr.lua
54 - lua test_integer.lua
42 # - lua$LUA_SFX test_register_llthreads.lua 55 # - lua$LUA_SFX test_register_llthreads.lua
43 56
44notifications: 57notifications:
diff --git a/.travis/platform.sh b/.travis/platform.sh
deleted file mode 100644
index 4a3af0d..0000000
--- a/.travis/platform.sh
+++ /dev/null
@@ -1,15 +0,0 @@
1if [ -z "$PLATFORM" ]; then
2 PLATFORM=$TRAVIS_OS_NAME;
3fi
4
5if [ "$PLATFORM" == "osx" ]; then
6 PLATFORM="macosx";
7fi
8
9if [ -z "$PLATFORM" ]; then
10 if [ "$(uname)" == "Linux" ]; then
11 PLATFORM="linux";
12 else
13 PLATFORM="macosx";
14 fi;
15fi
diff --git a/.travis/setup_lua.sh b/.travis/setup_lua.sh
deleted file mode 100644
index e37d6cf..0000000
--- a/.travis/setup_lua.sh
+++ /dev/null
@@ -1,101 +0,0 @@
1#! /bin/bash
2
3# A script for setting up environment for travis-ci testing.
4# Sets up Lua and Luarocks.
5# LUA must be "lua5.1", "lua5.2" or "luajit".
6# luajit2.0 - master v2.0
7# luajit2.1 - master v2.1
8
9LUAJIT_BASE="LuaJIT-2.0.3"
10
11source .travis/platform.sh
12
13LUAJIT="no"
14
15if [ "$PLATFORM" == "macosx" ]; then
16 if [ "$LUA" == "luajit" ]; then
17 LUAJIT="yes";
18 fi
19 if [ "$LUA" == "luajit2.0" ]; then
20 LUAJIT="yes";
21 fi
22 if [ "$LUA" == "luajit2.1" ]; then
23 LUAJIT="yes";
24 fi;
25elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then
26 LUAJIT="yes";
27fi
28
29if [ "$LUAJIT" == "yes" ]; then
30
31 if [ "$LUA" == "luajit" ]; then
32 curl http://luajit.org/download/$LUAJIT_BASE.tar.gz | tar xz;
33 else
34 git clone http://luajit.org/git/luajit-2.0.git $LUAJIT_BASE;
35 fi
36
37 cd $LUAJIT_BASE
38
39 if [ "$LUA" == "luajit2.1" ]; then
40 git checkout v2.1;
41 fi
42
43 make && sudo make install
44
45 if [ "$LUA" == "luajit2.1" ]; then
46 sudo ln -s /usr/local/bin/luajit-2.1.0-alpha /usr/local/bin/luajit
47 sudo ln -s /usr/local/bin/luajit /usr/local/bin/lua;
48 else
49 sudo ln -s /usr/local/bin/luajit /usr/local/bin/lua;
50 fi;
51
52else
53 if [ "$LUA" == "lua5.1" ]; then
54 curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz
55 cd lua-5.1.5;
56 elif [ "$LUA" == "lua5.2" ]; then
57 curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz
58 cd lua-5.2.3;
59 elif [ "$LUA" == "lua5.3" ]; then
60 curl http://www.lua.org/ftp/lua-5.3.0.tar.gz | tar xz
61 cd lua-5.3.0;
62 fi
63 sudo make $PLATFORM install;
64fi
65
66cd $TRAVIS_BUILD_DIR;
67
68LUAROCKS_BASE=luarocks-$LUAROCKS
69
70# curl http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz
71
72git clone https://github.com/keplerproject/luarocks.git $LUAROCKS_BASE
73cd $LUAROCKS_BASE
74
75git checkout v$LUAROCKS
76
77if [ "$LUA" == "luajit" ]; then
78 ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0;
79elif [ "$LUA" == "luajit2.0" ]; then
80 ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0;
81elif [ "$LUA" == "luajit2.1" ]; then
82 ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.1;
83else
84 ./configure;
85fi
86
87make build && sudo make install
88
89cd $TRAVIS_BUILD_DIR
90
91rm -rf $LUAROCKS_BASE
92
93if [ "$LUAJIT" == "yes" ]; then
94 rm -rf $LUAJIT_BASE;
95elif [ "$LUA" == "lua5.1" ]; then
96 rm -rf lua-5.1.5;
97elif [ "$LUA" == "lua5.2" ]; then
98 rm -rf lua-5.2.3;
99elif [ "$LUA" == "lua5.3" ]; then
100 rm -rf lua-5.3.0;
101fi