language: c

compiler:
    - clang
    - gcc

env:
    - LUA_PC=lua5.1 PACKAGES="lua5.1 liblua5.1-dev"
    - LUA_PC=lua5.2 PACKAGES="lua5.2 liblua5.2-dev"
    - LUA_PC=luajit PACKAGES="luajit libluajit-5.1-dev" PPA=mwild1/ppa

before_install:
    - if test -n "${PPA}"; then sudo add-apt-repository -y "ppa:${PPA}"; fi
    - sudo apt-get update -qq

install:
    - sudo apt-get -y install pkg-config ${PACKAGES}
    - git clone git://github.com/google/gumbo-parser.git
    - cd gumbo-parser
    - sh autogen.sh
    - ./configure --prefix=/usr
    - make
    - sudo make install
    - cd ..
    - sudo ldconfig

script:
    - make env
    - make check
    - make check-install

branches:
    only:
        - master

notifications:
    email:
        on_success: change
        on_failure: always

language: c

compiler:
    - clang
    - gcc

env:
    - LUA_PC=lua5.1 PACKAGES="lua5.1 liblua5.1-dev"
    - LUA_PC=lua5.2 PACKAGES="lua5.2 liblua5.2-dev"
    - LUA_PC=luajit PACKAGES="luajit libluajit-5.1-dev"
    - LUA_PC=luajit PACKAGES="luajit libluajit-5.1-dev" LUA="luajit -joff"

before_install:
    - test luajit = ${LUA_PC} && sudo add-apt-repository -y ppa:mwild1/ppa || :
    - sudo apt-get update -qq

install:
    - sudo apt-get -y install pkg-config ${PACKAGES}
    - git clone git://github.com/google/gumbo-parser.git
    - cd gumbo-parser
    - sh autogen.sh
    - ./configure --prefix=/usr
    - make
    - sudo make install
    - cd ..
    - sudo ldconfig

script:
    - make env
    - make check
    - make check-install

branches:
    only:
        - master

notifications:
    email:
        on_success: change
        on_failure: always

Add LUA_PC=luajit LUA="luajit -joff" to Travis build matrix
Add LUA_PC=luajit LUA="luajit -joff" to Travis build matrix
