diff options
author | Oscar Lim <olim@ucla.edu> | 2016-01-24 22:53:37 -0800 |
---|---|---|
committer | Oscar Lim <olim@ucla.edu> | 2016-02-10 23:45:49 -0800 |
commit | 7499b422e3f07bf25704cbf7989e845f89697fa8 (patch) | |
tree | 524d8a262a9d61486b858e70c64f8aedbda43095 /.travis_setup.sh | |
download | luasystem-7499b422e3f07bf25704cbf7989e845f89697fa8.tar.gz luasystem-7499b422e3f07bf25704cbf7989e845f89697fa8.tar.bz2 luasystem-7499b422e3f07bf25704cbf7989e845f89697fa8.zip |
Support for gettime and sleep functions
Provide `gettime` and `sleep` functions with at least 1 millisecond
resolution.
Diffstat (limited to '.travis_setup.sh')
-rw-r--r-- | .travis_setup.sh | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/.travis_setup.sh b/.travis_setup.sh new file mode 100644 index 0000000..f186230 --- /dev/null +++ b/.travis_setup.sh | |||
@@ -0,0 +1,45 @@ | |||
1 | # A script for setting up environment for travis-ci testing. | ||
2 | # Sets up Lua and Luarocks. | ||
3 | # LUA must be "Lua 5.1", "Lua 5.2", "Lua 5.3" or "LuaJIT 2.0". | ||
4 | |||
5 | set -e | ||
6 | |||
7 | echo 'rocks_servers = { | ||
8 | "http://luarocks.org/manifests/olivine-labs", | ||
9 | "http://rocks.moonscript.org/", | ||
10 | "http://luarocks.org/repositories/rocks", | ||
11 | "http://luarocks.logiceditor.com/rocks", | ||
12 | "http://liblua.so/luarocks/repositories/rocks" | ||
13 | }' >> ~/config.lua | ||
14 | |||
15 | |||
16 | if [ "$LUA" == "LuaJIT 2.0" ]; then | ||
17 | wget -O - http://luajit.org/download/LuaJIT-2.0.4.tar.gz | tar xz | ||
18 | cd LuaJIT-2.0.4 | ||
19 | make && sudo make install INSTALL_TSYMNAME=lua; | ||
20 | else | ||
21 | if [ "$LUA" == "Lua 5.1" ]; then | ||
22 | wget -O - http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz | ||
23 | cd lua-5.1.5; | ||
24 | elif [ "$LUA" == "Lua 5.2" ]; then | ||
25 | wget -O - http://www.lua.org/ftp/lua-5.2.4.tar.gz | tar xz | ||
26 | cd lua-5.2.4; | ||
27 | elif [ "$LUA" == "Lua 5.3" ]; then | ||
28 | wget -O - http://www.lua.org/ftp/lua-5.3.2.tar.gz | tar xz | ||
29 | cd lua-5.3.2; | ||
30 | fi | ||
31 | sudo make linux install; | ||
32 | fi | ||
33 | |||
34 | cd .. | ||
35 | wget -O - http://luarocks.org/releases/luarocks-2.3.0.tar.gz | tar xz || wget -O - http://keplerproject.github.io/luarocks/releases/luarocks-2.3.0.tar.gz | tar xz | ||
36 | cd luarocks-2.3.0 | ||
37 | |||
38 | if [ "$LUA" == "LuaJIT 2.0" ]; then | ||
39 | ./configure --with-lua-include=/usr/local/include/luajit-2.0; | ||
40 | else | ||
41 | ./configure; | ||
42 | fi | ||
43 | |||
44 | make build && sudo make install | ||
45 | cd .. | ||