diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/common.sh | 65 | ||||
-rw-r--r-- | scripts/compile-libuv.sh | 10 | ||||
-rw-r--r-- | scripts/compile-lua.sh | 6 | ||||
-rw-r--r-- | scripts/setup-test-tools.sh | 26 | ||||
-rwxr-xr-x | scripts/travis.sh | 11 | ||||
-rw-r--r-- | scripts/unittest.sh | 10 |
6 files changed, 9 insertions, 119 deletions
diff --git a/scripts/common.sh b/scripts/common.sh deleted file mode 100644 index 5196d594a3..0000000000 --- a/scripts/common.sh +++ /dev/null @@ -1,65 +0,0 @@ -platform='unknown' -unameval=`uname` -if [ "$unameval" = 'Linux' ]; then - platform='linux' -elif [ "$unameval" = 'FreeBSD' ]; then - platform='freebsd' -elif [ "$unameval" = 'Darwin' ]; then - platform='darwin' -fi - -sha1sumcmd='sha1sum' -if [ "$platform" = 'freebsd' ]; then - sha1sumcmd='shasum' -elif [ "$platform" = 'darwin' ]; then - sha1sumcmd='shasum' -fi - -pkgroot="$(pwd)" -deps="$pkgroot/.deps" -prefix="$deps/usr" -export PATH="$prefix/bin:$PATH" - -download() { - local url=$1 - local tgt=$2 - local sha1=$3 - - if [ ! -d "$tgt" ]; then - mkdir -p "$tgt" - local download_command="" - if which wget > /dev/null 2>&1; then - # -O - to send output to stdout - download_command="wget --no-verbose $url -O -" - elif which curl >/dev/null 2>&1; then - # -L to follow the redirects that github will send us - # -sS to supress the progress bar, but show errors - # curl sends output to stdout by default - download_command="curl -L -sS $url" - else - echo "Missing wget utility and curl utility" - exit 1 - fi - local tmp_dir=$(mktemp -d "/tmp/download_sha1check_XXXXXXX") - local fifo="$tmp_dir/fifo" - mkfifo "$fifo" - echo "Downloading $url..." - # download, untar and calculate sha1 sum in one pass - ($download_command | tee "$fifo" | \ - (cd "$tgt"; tar --strip-components=1 -xzf -)) & - local sum=$("$sha1sumcmd" < "$fifo" | cut -d ' ' -f1) - rm -rf "$tmp_dir" - if [ "$sum" != "$sha1" ]; then - echo "SHA1 sum doesn't match, expected '$sha1' got '$sum'" - exit 1 - else - echo "Download complete." - fi - fi -} - -github_download() { - local repo=$1 - local ver=$2 - download "https://github.com/${repo}/archive/${ver}.tar.gz" "$3" "$4" -} diff --git a/scripts/compile-libuv.sh b/scripts/compile-libuv.sh deleted file mode 100644 index 9979aa1095..0000000000 --- a/scripts/compile-libuv.sh +++ /dev/null @@ -1,10 +0,0 @@ -. scripts/common.sh - -uv_dir="third-party/libuv" - -cd "$uv_dir" -sh autogen.sh -./configure --prefix="$prefix" --with-pic -make -make install -rm "$prefix/lib/"libuv*.{so,dylib} "$prefix/lib/"libuv*.{so,dylib}.* || true diff --git a/scripts/compile-lua.sh b/scripts/compile-lua.sh deleted file mode 100644 index 9187c07877..0000000000 --- a/scripts/compile-lua.sh +++ /dev/null @@ -1,6 +0,0 @@ -. scripts/common.sh - -lua_dir="$pkgroot/third-party/luajit" - -cd "$lua_dir" -make PREFIX="$prefix" install diff --git a/scripts/setup-test-tools.sh b/scripts/setup-test-tools.sh deleted file mode 100644 index 97ba808dd4..0000000000 --- a/scripts/setup-test-tools.sh +++ /dev/null @@ -1,26 +0,0 @@ -. scripts/common.sh - -luarocks_ver=v2.1.2 -luarocks_repo=keplerproject/luarocks -luarocks_sha1=69ea9b641a5066b1f316847494d8c63a4693977d -luarocks_dir="$pkgroot/third-party/luarocks" - -github_download "$luarocks_repo" "$luarocks_ver" "$luarocks_dir" \ - "$luarocks_sha1" - -cd "$luarocks_dir" - -./configure --prefix="$prefix" --force-config --with-lua="$prefix" \ - --with-lua-include="$prefix/include/luajit-2.0" \ - --lua-suffix="jit" - -make bootstrap - -echo 'rocks_servers = { - "http://luarocks.giga.puc-rio.br/"; -}' >> "$prefix/etc/luarocks/config-5.1.lua" - -# install tools for testing -luarocks install moonrocks --server=http://rocks.moonscript.org -moonrocks install moonscript -moonrocks install busted diff --git a/scripts/travis.sh b/scripts/travis.sh index 8b79930aa0..8ae9a7a502 100755 --- a/scripts/travis.sh +++ b/scripts/travis.sh @@ -17,6 +17,14 @@ check_and_report() { ) } +# Travis reports back that it has 32-cores via /proc/cpuinfo, but it's not +# what we really have available. According to their documentation, it only has +# 1.5 virtual cores. +# See: +# http://docs.travis-ci.com/user/speeding-up-the-build/#Paralellizing-your-build-on-one-VM +# for more information. +alias make="make -j2" + if [ "$CC" = "clang" ]; then # force using the version installed by 'travis-setup.sh' export CC=/usr/bin/clang @@ -46,9 +54,8 @@ if [ "$CC" = "clang" ]; then check_and_report make install else - export BUSTED_OUTPUT_TYPE="TAP" export SKIP_EXEC=1 + make CMAKE_EXTRA_FLAGS="-DBUSTED_OUTPUT_TYPE=TAP" make cmake make unittest fi - diff --git a/scripts/unittest.sh b/scripts/unittest.sh deleted file mode 100644 index 539fae6401..0000000000 --- a/scripts/unittest.sh +++ /dev/null @@ -1,10 +0,0 @@ -. scripts/common.sh - -(cd "$pkgroot/build" && make) || exit 1 -eval "$(luarocks path)" - -if [ -z "$BUSTED_OUTPUT_TYPE" ]; then - export BUSTED_OUTPUT_TYPE="utf_terminal" -fi -make -C ./test/includes -busted --pattern=.moon -o $BUSTED_OUTPUT_TYPE ./test |