This repository has been archived by the owner on Nov 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 568
/
.travis.yml
51 lines (44 loc) · 1.7 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
# ref: http://docs.travis-ci.com/user/build-configuration
language: erlang
env:
global:
- DEPS_BUILD_DIR=$TRAVIS_BUILD_DIR/deps
- LJ_REPO="https://github.com/LuaJIT/LuaJIT.git"
- INC_DIR=/usr/local/include
matrix:
- LUA=lua-5.1 LUA_TYPE=lua LUA_DIST=lua-5.1.5 LUA_BD=lua LUA_INC=$INC_DIR
- LUA=lua-5.2 LUA_TYPE=lua LUA_DIST=lua-5.2.4 LUA_BD=lua LUA_INC=$INC_DIR
- LUA=lua-5.3 LUA_TYPE=lua LUA_DIST=lua-5.3.2 LUA_BD=lua53 LUA_INC=$INC_DIR
- LUA=luajit-2.0 LUA_TYPE=luajit LJ_BR=master LUA_BD=lua LUA_INC=$INC_DIR/$LUA
- LUA=luajit-2.1 LUA_TYPE=luajit LJ_BR=v2.1 LUA_BD=lua LUA_INC=$INC_DIR/$LUA
before_install:
- mkdir -p $DEPS_BUILD_DIR
- sudo apt-get update -qq
- sudo apt-get install libprotobuf-dev protobuf-compiler
- LUA_BIN=lua
install:
# install Lua/LuaJIT
- cd $DEPS_BUILD_DIR
- if [ "$LUA_TYPE" == "luajit" ]; then
git clone -b $LJ_BR $LJ_REPO luajit2.git && cd luajit2.git && LJ_TAG=`git describe --abbre=0` && LUA_BIN="luajit-${LJ_TAG:1}" && sudo make install;
fi
- if [ "$LUA_TYPE" == "lua" ]; then
wget "http://www.lua.org/ftp/$LUA_DIST.tar.gz" && tar xzf $LUA_DIST.tar.gz && cd $LUA_DIST && sudo make linux test install;
fi
# build lib
- cd $TRAVIS_BUILD_DIR
- make
# build lib bindings
- make -C binding/$LUA_BD LUADIR=$LUA_INC
before_script:
# back to home directory
- cd $TRAVIS_BUILD_DIR
# check executables
- which $LUA_BIN 2>/dev/null && $LUA_BIN -v
script:
- cd $TRAVIS_BUILD_DIR/binding/$LUA_BD
- $LUA_BIN test.lua
notifications:
email:
on_success: change
on_failure: always