sudo: required
language: c
compiler:
  - gcc
  - clang
env:
  - DIST=stretch
  - DIST=sid
services:
  - docker
before_install:
  - docker pull kamailio/pkg-kamailio-docker:dev-$DIST
script: docker run -v $TRAVIS_BUILD_DIR:/code:rw kamailio/pkg-kamailio-docker:dev-$DIST /bin/bash -c "cd /code; CC=$CC DIST=$DIST ./test/travis/build_travis.sh"
branches:
  only:
    - 'master'
    - '/^5\.[0-9]+$/'
notifications:
  irc:
    channels:
      - "chat.freenode.net#kamailio-dev"
    on_success: never
    on_failure: always
  email:
    recipients:
      - sr-dev@lists.kamailio.org
    on_success: never
    on_failure: always