-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
64 lines (56 loc) · 2.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# ref: http://docs.travis-ci.com/user/build-configuration
language: erlang
sudo: false
env:
global:
- DEPS_BUILD_DIR=$TRAVIS_BUILD_DIR/deps
- DEPS_PREFIX=$DEPS_BUILD_DIR/dist
- DEPS_BIN_DIR=$DEPS_PREFIX/bin
- DEPS_LIB_DIR=$DEPS_PREFIX/lib
- LZ4_VER=r131
- LUAROCKS_VER=2.2.2
- LZ4_URL="https://github.com/Cyan4973/lz4/archive/$LZ4_VER.tar.gz"
- LUAROCKS_URL="http://keplerproject.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz"
- LJ_REPO="https://github.com/LuaJIT/LuaJIT.git"
matrix:
- LJ=luajit-2.0 LJ_BR=master
- LJ=luajit-2.1 LJ_BR=v2.1
before_install:
- mkdir -p $DEPS_BUILD_DIR
#- sudo apt-get update -qq
install:
# update the paths first
- export PATH=$DEPS_BIN_DIR:$PATH
- export LD_LIBRARY_PATH=$DEPS_LIB_DIR:$LD_LIBRARY_PATH
# install LZ4
- cd $DEPS_BUILD_DIR
- wget $LZ4_URL -O lz4-$LZ4_VER.tar.gz
- tar xzf lz4-$LZ4_VER.tar.gz && cd lz4-$LZ4_VER
- make PREFIX=$DEPS_PREFIX install
# install LuaJIT
- cd $DEPS_BUILD_DIR
- git clone -b $LJ_BR $LJ_REPO luajit2.git && cd luajit2.git
- LJ_TAG=`git describe --abbre=0` && LJ_BIN_SUFFIX=jit-${LJ_TAG:1} && LJ_BIN=lua$LJ_BIN_SUFFIX
- make PREFIX=$DEPS_PREFIX XCFLAGS+="-DLUAJIT_ENABLE_LUA52COMPAT" install
# install luarocks
- cd $DEPS_BUILD_DIR
- wget $LUAROCKS_URL -O luarocks-$LUAROCKS_VER.tar.gz
- tar xzf luarocks-$LUAROCKS_VER.tar.gz && cd luarocks-$LUAROCKS_VER
- ./configure --prefix=$DEPS_PREFIX
--lua-version=5.1 --lua-suffix=$LJ_BIN_SUFFIX --with-lua-include=$DEPS_PREFIX/include/$LJ && make build install
# install busted
- luarocks install busted
before_script:
# back to home directory
- cd $TRAVIS_BUILD_DIR
# update shared libraries
#- sudo ldconfig -v 2> /dev/null | grep lz4
# check executables
- which $LJ_BIN 2>/dev/null && $LJ_BIN -v
- head -1 `which luarocks`
script:
- busted -v
notifications:
email:
on_success: change
on_failure: always