diff --git a/.travis.yml b/.travis.yml index 984c8d6..a34b13e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,33 +1,55 @@ language: c -env: - global: - - LUAROCKS=2.2.0 +sudo: false - matrix: - - LUA=lua5.1 - - LUA=lua5.2 - - LUA=luajit +addons: + apt: + packages: + - openssl + - libzmq3 + - libzmq3-dev + +matrix: + include: + - compiler: ": Lua51" + env: LUA="lua 5.1" + - compiler: ": Lua52" + env: LUA="lua 5.2" + - compiler: ": Lua53" + env: LUA="lua 5.3" + - compiler: ": LuaJIT20" + env: LUA="luajit 2.0" + - compiler: ": LuaJIT21" + env: LUA="luajit 2.1" + +cache: + directories: + - here + - $HOME/.cache/pip branches: only: - master before_install: - - bash .travis/setup_lua.sh - - sudo apt-get install libzmq3 libzmq3-dev + - export CC=gcc + - pip install --user hererocks + - hererocks here -r^ --$LUA; + - export PATH=$PATH:$PWD/here/bin install: - - sudo luarocks install busted - - sudo luarocks install lunitx - - sudo luarocks install date - - sudo luarocks install luafilesystem - - sudo luarocks install lua-path - - sudo luarocks install lzmq - - sudo luarocks install lua-llthreads2 - - sudo luarocks install lanes - - sudo luarocks make rockspecs/lua-log-scm-0.rockspec - - sudo luarocks install luasocket + - luarocks make rockspecs/lua-log-scm-0.rockspec + +before_script: + - luarocks show busted || luarocks install busted + - luarocks show lunitx || luarocks install lunitx + - luarocks show luafilesystem || luarocks install luafilesystem + - luarocks show lua-path || luarocks install lua-path + - luarocks show lzmq || luarocks install lzmq + - luarocks show lua-llthreads2 || luarocks install lua-llthreads2 + - luarocks show lanes || luarocks install lanes + - luarocks show luasocket || luarocks install luasocket + - luarocks show lpeg || luarocks install lpeg script: - cd test 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 @@ -if [ -z "$PLATFORM" ]; then - PLATFORM=$TRAVIS_OS_NAME; -fi - -if [ "$PLATFORM" == "osx" ]; then - PLATFORM="macosx"; -fi - -if [ -z "$PLATFORM" ]; then - if [ "$(uname)" == "Linux" ]; then - PLATFORM="linux"; - else - PLATFORM="macosx"; - fi; -fi diff --git a/.travis/setup_lua.sh b/.travis/setup_lua.sh deleted file mode 100644 index 373e24d..0000000 --- a/.travis/setup_lua.sh +++ /dev/null @@ -1,101 +0,0 @@ -#! /bin/bash - -# A script for setting up environment for travis-ci testing. -# Sets up Lua and Luarocks. -# LUA must be "lua5.1", "lua5.2" or "luajit". -# luajit2.0 - master v2.0 -# luajit2.1 - master v2.1 - -LUAJIT_BASE="LuaJIT-2.0.3" - -source .travis/platform.sh - -LUAJIT="no" - -if [ "$PLATFORM" == "macosx" ]; then - if [ "$LUA" == "luajit" ]; then - LUAJIT="yes"; - fi - if [ "$LUA" == "luajit2.0" ]; then - LUAJIT="yes"; - fi - if [ "$LUA" == "luajit2.1" ]; then - LUAJIT="yes"; - fi; -elif [ "$(expr substr $LUA 1 6)" == "luajit" ]; then - LUAJIT="yes"; -fi - -if [ "$LUAJIT" == "yes" ]; then - - if [ "$LUA" == "luajit" ]; then - curl http://luajit.org/download/$LUAJIT_BASE.tar.gz | tar xz; - else - git clone http://luajit.org/git/luajit-2.0.git $LUAJIT_BASE; - fi - - cd $LUAJIT_BASE - - if [ "$LUA" == "luajit2.1" ]; then - git checkout v2.1; - fi - - make && sudo make install - - if [ "$LUA" == "luajit2.1" ]; then - sudo ln -s /usr/local/bin/luajit-2.1.0-alpha /usr/local/bin/luajit - sudo ln -s /usr/local/bin/luajit /usr/local/bin/lua; - else - sudo ln -s /usr/local/bin/luajit /usr/local/bin/lua; - fi; - -else - if [ "$LUA" == "lua5.1" ]; then - curl http://www.lua.org/ftp/lua-5.1.5.tar.gz | tar xz - cd lua-5.1.5; - elif [ "$LUA" == "lua5.2" ]; then - curl http://www.lua.org/ftp/lua-5.2.3.tar.gz | tar xz - cd lua-5.2.3; - elif [ "$LUA" == "lua5.3" ]; then - curl http://www.lua.org/work/lua-5.3.0-beta.tar.gz | tar xz - cd lua-5.3.0-beta; - fi - sudo make $PLATFORM install; -fi - -cd $TRAVIS_BUILD_DIR; - -LUAROCKS_BASE=luarocks-$LUAROCKS - -# curl http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz | tar xz - -git clone https://github.com/keplerproject/luarocks.git $LUAROCKS_BASE -cd $LUAROCKS_BASE - -git checkout v$LUAROCKS - -if [ "$LUA" == "luajit" ]; then - ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0; -elif [ "$LUA" == "luajit2.0" ]; then - ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.0; -elif [ "$LUA" == "luajit2.1" ]; then - ./configure --lua-suffix=jit --with-lua-include=/usr/local/include/luajit-2.1; -else - ./configure; -fi - -make build && sudo make install - -cd $TRAVIS_BUILD_DIR - -rm -rf $LUAROCKS_BASE - -if [ "$LUAJIT" == "yes" ]; then - rm -rf $LUAJIT_BASE; -elif [ "$LUA" == "lua5.1" ]; then - rm -rf lua-5.1.5; -elif [ "$LUA" == "lua5.2" ]; then - rm -rf lua-5.2.3; -elif [ "$LUA" == "lua5.3" ]; then - rm -rf lua-5.3.0-beta; -fi diff --git a/.travis/setup_zmq.sh b/.travis/setup_zmq.sh deleted file mode 100644 index de93f06..0000000 --- a/.travis/setup_zmq.sh +++ /dev/null @@ -1,40 +0,0 @@ - -source .travis/platform.sh - -echo "===============================" -echo " Platform : $PLATFORM " -echo "===============================" -echo - -if [ "$PLATFORM" == "linux" ]; then - sudo apt-get remove libzmq3; -fi - -ZMQ_BASE_DIR="libzmq" - -ZMQ_REPO="libzmq" - -if [ "$ZMQ_VER" == "3.2" ]; then - ZMQ_REPO="zeromq3-x"; -elif [ "$ZMQ_VER" == "4.0" ]; then - ZMQ_REPO="zeromq4-x"; -elif [ "$ZMQ_VER" == "4.1" ]; then - ZMQ_REPO="zeromq4-1"; -elif [ "$ZMQ_VER" == "4.2" ]; then - ZMQ_REPO="libzmq"; -elif [ "$ZMQ_VER" == "scm" ]; then - ZMQ_REPO="libzmq"; -else - ZMQ_REPO="libzmq"; -fi - -git clone https://github.com/zeromq/$ZMQ_REPO.git ./$ZMQ_BASE_DIR - -cd ./$ZMQ_BASE_DIR - -./autogen.sh -./configure -sudo make -sudo make install - -cd $TRAVIS_BUILD_DIR \ No newline at end of file diff --git a/rockspecs/lua-log-scm-0.rockspec b/rockspecs/lua-log-scm-0.rockspec index 194a495..9e1223b 100644 --- a/rockspecs/lua-log-scm-0.rockspec +++ b/rockspecs/lua-log-scm-0.rockspec @@ -14,7 +14,7 @@ description = { } dependencies = { - "lua >= 5.1", + "lua >= 5.1, < 5.4", "date >= 2.0", -- "lpeg >= 0.10.0", -- "llthread >= 1.2",