base: rewrite language as python for broader support of the .travis.yml
[luajson.git] / .travis.yml
blobf856ee712ed05295a23bbb2af1a83abfea60f778
1 # Lie about language support for broader support
2 language: python
4 branches:
5     only:
6         - master
7         - next
8         - 1.2.x
9         - 1.1.x
10         - 1.0.x
12 env:
13     global:
14         - LUAROCKS_BASE=luarocks-2.2.0
15     matrix:
16         - LPEG=0.7-3 LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
17         - LPEG=0.7-3 LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
18         - LPEG=0.8.1-1 LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
19         - LPEG=0.8.1-1 LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
20         - LPEG=0.9-1 LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
21         - LPEG=0.9-1 LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
22         - LPEG=0.10.2-1 LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
23         - LPEG=0.10.2-1 LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2
24         - LPEG=0.10.2-1 LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
25         - LPEG=0.12-1 LUA=lua5.1 LUA_DEV=liblua5.1-dev LUA_VER=5.1 LUA_SFX=5.1 LUA_INCDIR=/usr/include/lua5.1
26         - LPEG=0.12-1 LUA=lua5.2 LUA_DEV=liblua5.2-dev LUA_VER=5.2 LUA_SFX=5.2 LUA_INCDIR=/usr/include/lua5.2
27         - LPEG=0.12-1 LUA=luajit LUA_DEV=libluajit-5.1-dev LUA_VER=5.1 LUA_SFX=jit LUA_INCDIR=/usr/include/luajit-2.0
29 branches:
30     only:
31         - master
33 before_install:
34     - if [ $LUA = "luajit" ]; then
35       sudo add-apt-repository ppa:mwild1/ppa -y && sudo apt-get update -y;
36       fi
37     - sudo apt-get install $LUA
38     - sudo apt-get install $LUA_DEV
39     - lua$LUA_SFX -v
40     # Install a recent luarocks release
41     - wget http://luarocks.org/releases/$LUAROCKS_BASE.tar.gz
42     - tar zxvpf $LUAROCKS_BASE.tar.gz
43     - cd $LUAROCKS_BASE
44     - ./configure
45       --lua-version=$LUA_VER --lua-suffix=$LUA_SFX --with-lua-include="$LUA_INCDIR"
46     - sudo make
47     - sudo make build
48     - sudo make install
49     - cd $TRAVIS_BUILD_DIR
50     - sudo -E luarocks install lunit
51     - sudo -E luarocks install luafilesystem
52     - sudo -E luarocks install lpeg $LPEG
54 script:
55     - make LUA_BIN=$LUA check
57 notifications:
58     email:
59         on_success: change
60         on_failure: always