aboutsummaryrefslogtreecommitdiff
path: root/.travis_setup.sh
diff options
context:
space:
mode:
authorOscar Lim <olim@ucla.edu>2016-01-24 22:53:37 -0800
committerOscar Lim <olim@ucla.edu>2016-02-10 23:45:49 -0800
commit7499b422e3f07bf25704cbf7989e845f89697fa8 (patch)
tree524d8a262a9d61486b858e70c64f8aedbda43095 /.travis_setup.sh
downloadluasystem-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.sh45
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
5set -e
6
7echo '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
16if [ "$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;
20else
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;
32fi
33
34cd ..
35wget -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
36cd luarocks-2.3.0
37
38if [ "$LUA" == "LuaJIT 2.0" ]; then
39 ./configure --with-lua-include=/usr/local/include/luajit-2.0;
40else
41 ./configure;
42fi
43
44make build && sudo make install
45cd ..