
language: c
git:
  depth: 3
dist:
  trusty

branches:
  only:
    - master
    - dev

sudo: required

before_install:
    - sudo apt-get update -qq
    - sudo apt-get install -qq check    

matrix:
  include:
    ## Coverage test
    - compiler: gcc
      env: ENABLE_COVERAGE=--enable-gcov
      before_install: pip install --user cpp-coveralls 
      after_success:
        - coveralls --exclude tests --exclude src/lexer.* --exclude src/lexer.* --exclude src/example.c --exclude src/util.c  --gcov-options '\-lp'

    ## Python bindings test (not compatible with gcov)
    - compiler: gcc
      env: ENABLE_PYTHON=--enable-python-bindings
      before_install:
        - pip install --user cython
        - pip install --user biopython
      after_failure: cat bindings/check-python.log

    ## Test C library with clang
    - compiler: clang    

before_script:
  - autoreconf -i
  - ./configure --enable-check CFLAGS="-fPIC -O2" $ENABLE_COVERAGE $ENABLE_PYTHON

script: make && make check

after_failure: cat test-api.log test-static.log test-memerr.log test-cli.log


language: c
git:
  depth: 3
dist:
  trusty

branches:
  only:
    - master
    - dev

before_install:
    - sudo apt-get update -qq
    - sudo apt-get install -qq check

matrix:
  include:
    ## Coverage test
    - compiler: gcc
      env: ENABLE_COVERAGE=--enable-gcov
      before_install:
        - pip install --user cpp-coveralls
        - sudo apt-get update -qq
        - sudo apt-get install -qq check
      after_success:
        - coveralls --exclude tests --exclude src/lexer.l --exclude src/lexer.c --exclude src/parser.c --exclude src/parser.y --exclude src/example.c --exclude src/util.c  --gcov-options '\-lp'

    ## Python bindings test (not compatible with gcov)
    - compiler: gcc
      env: ENABLE_PYTHON=--enable-python-bindings
      before_install:
        - pip install --user cython
        - pip install --user biopython
        - sudo apt-get update -qq
        - sudo apt-get install -qq check
      after_failure: cat bindings/check-python.log

    ## Test C library with clang
    - compiler: clang    

before_script:
  - autoreconf -i
  - ./configure --enable-check CFLAGS="-fPIC -O2" $ENABLE_COVERAGE $ENABLE_PYTHON

script: make && make check

after_failure: cat test-api.log test-static.log test-memerr.log test-cli.log

Expand before_install, add more exclusions
Expand before_install, add more exclusions
