From 3422dd2ae3cf2c3676846e4300529a5cc9a36191 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 29 Sep 2017 20:17:52 -0300 Subject: Travis: add cache --- .travis.yml | 27 +++++++++++++++++++++------ makedist | 7 ++++++- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ee0b740..18c8504f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,19 @@ language: python +cache: + directories: + - lua_install + - test/testing_cache-5.1 + - test/testing_cache-5.2 + - test/testing_cache-5.3 + - test/testing_cache-2.0 + - test/testing_cache-2.1 + - test/testing_server-5.1 + - test/testing_server-5.2 + - test/testing_server-5.3 + - test/testing_server-2.0 + - test/testing_server-2.1 + matrix: include: - os: linux @@ -40,17 +54,18 @@ matrix: before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update;fi - - pip install hererocks - - hererocks lua_install -r^ --$LUA + - if [ ! -f lua_install/bin/luarocks ]; then pip install hererocks; fi + - if [ ! -f lua_install/bin/luarocks ]; then hererocks lua_install -r^ --$LUA; fi - export PATH=$PATH:$PWD/lua_install/bin # Add directory with all installed binaries to PATH install: - - luarocks install busted - - luarocks install luacov - - luarocks install luacov-coveralls + - if [ ! -f lua_install/bin/busted ]; then luarocks install busted; fi + - if [ ! -f lua_install/bin/luacov ]; then luarocks install luacov; luarocks install luacov-coveralls; fi script: + - lua -v + - ./configure --with-lua=lua_install + - ./makedist scm - busted -o gtest --verbose -Xhelper travis - busted -o gtest --verbose -Xhelper travis,env=full diff --git a/makedist b/makedist index fb41b981..1a16a115 100755 --- a/makedist +++ b/makedist @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash -e if ! [ "$1" ] then @@ -14,6 +14,9 @@ fi make clean || exit 1 +if [ "$1" != "scm" ] +then + grep -q "\"$1\"" rockspec || { echo echo "version in rockspec is incorrect. Please fix it." @@ -53,6 +56,8 @@ grep -q "vars.VERSION = \"$program_series\"" install.bat || { exit 1 } +fi + out="luarocks-$1" rm -rf "$out" mkdir "$out" -- cgit v1.2.3-55-g6feb