language: cpp

compiler:
  - gcc
  - clang

env:
  - BUILD_TYPE="CheckAllOpt" BUILD="make check-all" CFLAGS="-O3" CXXFLAGS="-O3" ANALYSIS="" ANALYSIS_ARGS=""
  - BUILD_TYPE="CheckAllDebug" BUILD="make check-all" CFLAGS="-g -O0" CXXFLAGS="-g -O0" ANALYSIS="" ANALYSIS_ARGS=""
  #- BUILD_TYPE="clang++ ScanBuild" BUILD="make check-all" CC="clang" CXX="clang++" CFLAGS="-g -O0" CXXFLAGS="-O3" ANALYSIS="scan-build" ANALYSIS_ARGS="-v -v -k" PACKAGES="clang"

before_install:
  - '[[ -z "${PACKAGES}" ]] || sudo apt-get -qq update'
  - '[[ -z "${PACKAGES}" ]] || sudo apt-get -qq install ${PACKAGES}'

script:
  - ${ANALYSIS} ./configure
  - ${ANALYSIS} ${ANALYSIS_ARGS} ${BUILD}

notifications:
  irc: "irc.freenode.net#seneca-webvtt"

language: cpp

compiler:
  - gcc
  - clang

env:
  - BUILD_TYPE="CheckAllOpt" BUILD="check --alltests" CFLAGS="-O3" CXXFLAGS="-O3" ANALYSIS="" ANALYSIS_ARGS=""
  - BUILD_TYPE="CheckAllDebug" BUILD="check --alltests" CFLAGS="-g -O0" CXXFLAGS="-g -O0" ANALYSIS="" ANALYSIS_ARGS=""
  - BUILD_TYPE="ScanBuild" BUILD="build" CFLAGS="-g -O0" CXXFLAGS="-O3" ANALYSIS="scan-build" ANALYSIS_ARGS="-v -v -k --status-bugs --use-cc --use-c++" PACKAGES="clang"

before_install:
  - '[[ -z "${PACKAGES}" ]] || sudo apt-get -qq update'
  - '[[ -z "${PACKAGES}" ]] || sudo apt-get -qq install ${PACKAGES}'

script:
  - ${ANALYSIS} ./waf configure
  - ${ANALYSIS} ${ANALYSIS_ARGS} ./waf ${BUILD}

notifications:
  irc: "irc.freenode.net#seneca-webvtt"

Use scan-build in automated CI
Use scan-build in automated CI

Unfortunately, for the time being there is no way to
make the build matrix not go crazy, so the current infrastructure
results in 6 builds :( It's not the end of the world though, since
this project isn't as busy as it could be. Testing to see how horrible
this is now.
