language: cpp
os:
  - linux
  - osx
env:
  - CFLAGS="-O0 -g" QMAKEFLAGS="-config debug" PATH=/opt/qt56/bin:/usr/local/opt/qt5/bin:$PATH
addons:
  apt:
    sources:
      - sourceline: 'ppa:beineri/opt-qt563-trusty'
    packages:
      - qt56base valgrind
install:
  - if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
        brew install qt5;
    fi
script:
  - make -s -f Makefile.configure configure | tee .config
  - make
        CFLAGS="$CFLAGS"
        all tests/Makefile
  - cd tests && make check -k
        TESTRUNNER=`which valgrind 2>/dev/null`

language: cpp
os:
  - linux
  - osx
env:
  - CFLAGS="-O0 -g" QMAKEFLAGS="-config debug" PATH=/opt/qt56/bin:/usr/local/opt/qt5/bin:$PATH
addons:
  apt:
    sources:
      - sourceline: 'ppa:beineri/opt-qt563-trusty'
    packages:
      - qt56base valgrind
install:
  - if [ "${TRAVIS_OS_NAME}" != "linux" ]; then
        brew update;
        brew install qt5;
    fi
script:
  - make -s -f Makefile.configure configure | tee .config
  - make
        CFLAGS="$CFLAGS"
        all tests/Makefile
  - cd tests && make check -k
        TESTRUNNER=`which valgrind 2>/dev/null`

Fix Travis builds on macOS
Fix Travis builds on macOS

Travis and Homebrew have been at odds: the Ruby in PATH is not what
Homebrew wants, so it prints:

 /usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `<main>': Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError)

Info in the Travis's own GitHub bug report indicates "brew update" fixes
this issue, even though it increases the build time.

Signed-off-by: Thiago Macieira <0ed1648d92ca0373297a182b1dba1b974ad10d88@intel.com>
