language: c

compiler:
        - gcc
        - clang

env:
        - CFLAGS=--coverage CONFOPT=
        - CFLAGS=--coverage CONFOPT=--enable-multithread

before_install:
        - sudo apt-get update -qq
        - sudo apt-get install -qq lcov rubygems
        - gem install lcoveralls

before_script:
        - ./configure $CONFOPT && make

script:
        - make pytest
        - make atest
        - ./sample/crnl
        - make -C sample test

after_success:
        - lcov -c -d .libs -o coverage.info
        - lcoveralls --retry-count 5 coverage.info
