diff options
author | Alexey Melnichuk <alexeymelnichuck@gmail.com> | 2016-09-05 16:23:18 +0300 |
---|---|---|
committer | Alexey Melnichuk <alexeymelnichuck@gmail.com> | 2016-09-05 16:23:18 +0300 |
commit | 60ae75bc02b6e319b9edaa03f1a70e478a9c2730 (patch) | |
tree | 4e2ba31c8c4cb1105096f681ad7ea63345a97189 | |
parent | 6ed85312ce7f923dfb936000ea87f91d366cc49b (diff) | |
download | lua-llthreads2-60ae75bc02b6e319b9edaa03f1a70e478a9c2730.tar.gz lua-llthreads2-60ae75bc02b6e319b9edaa03f1a70e478a9c2730.tar.bz2 lua-llthreads2-60ae75bc02b6e319b9edaa03f1a70e478a9c2730.zip |
Update Travis files.
-rw-r--r-- | .travis.yml | 37 | ||||
-rw-r--r-- | .travis/platform.sh | 15 | ||||
-rw-r--r-- | .travis/setup_lua.sh | 101 |
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 @@ | |||
1 | language: c | 1 | sudo: false |
2 | 2 | ||
3 | env: | 3 | matrix: |
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 | |||
16 | cache: | ||
17 | directories: | ||
18 | - here | ||
19 | - $HOME/.cache/pip | ||
11 | 20 | ||
12 | branches: | 21 | branches: |
13 | only: | 22 | only: |
14 | - master | 23 | - master |
15 | 24 | ||
16 | before_install: | 25 | before_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 | ||
19 | install: | 31 | install: |
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 | ||
23 | script: | 35 | script: |
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 | ||
44 | notifications: | 57 | notifications: |
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 @@ | |||
1 | if [ -z "$PLATFORM" ]; then | ||
2 | PLATFORM=$TRAVIS_OS_NAME; | ||
3 | fi | ||
4 | |||
5 | if [ "$PLATFORM" == "osx" ]; then | ||
6 | PLATFORM="macosx"; | ||
7 | fi | ||
8 | |||
9 | if [ -z "$PLATFORM" ]; then | ||
10 | if [ "$(uname)" == "Linux" ]; then | ||
11 | PLATFORM="linux"; | ||
12 | else | ||
13 | PLATFORM="macosx"; | ||
14 | fi; | ||
15 | fi | ||
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 | |||
9 | LUAJIT_BASE="LuaJIT-2.0.3" | ||
10 | |||
11 | source .travis/platform.sh | ||
12 | |||
13 | LUAJIT="no" | ||
14 | |||
15 | if [ "$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; | ||
25 | elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then | ||
26 | LUAJIT="yes"; | ||
27 | fi | ||
28 | |||
29 | if [ "$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 | |||
52 | else | ||
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; | ||
64 | fi | ||
65 | |||
66 | cd $TRAVIS_BUILD_DIR; | ||
67 | |||
68 | LUAROCKS_BASE=luarocks-$LUAROCKS | ||
69 | |||
70 | # curl http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz | ||
71 | |||
72 | git clone https://github.com/keplerproject/luarocks.git $LUAROCKS_BASE | ||
73 | cd $LUAROCKS_BASE | ||
74 | |||
75 | git checkout v$LUAROCKS | ||
76 | |||
77 | if [ "$LUA" == "luajit" ]; then | ||
78 | ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0; | ||
79 | elif [ "$LUA" == "luajit2.0" ]; then | ||
80 | ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0; | ||
81 | elif [ "$LUA" == "luajit2.1" ]; then | ||
82 | ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.1; | ||
83 | else | ||
84 | ./configure; | ||
85 | fi | ||
86 | |||
87 | make build && sudo make install | ||
88 | |||
89 | cd $TRAVIS_BUILD_DIR | ||
90 | |||
91 | rm -rf $LUAROCKS_BASE | ||
92 | |||
93 | if [ "$LUAJIT" == "yes" ]; then | ||
94 | rm -rf $LUAJIT_BASE; | ||
95 | elif [ "$LUA" == "lua5.1" ]; then | ||
96 | rm -rf lua-5.1.5; | ||
97 | elif [ "$LUA" == "lua5.2" ]; then | ||
98 | rm -rf lua-5.2.3; | ||
99 | elif [ "$LUA" == "lua5.3" ]; then | ||
100 | rm -rf lua-5.3.0; | ||
101 | fi | ||