# Use trusty

# Enable C++ support
language: cpp

matrix:
  include:
    - os: linux
      sudo: required
      dist: trusty
      compiler: gcc
      env: HOPSAN_BUILD_QMAKE_SPEC=linux-g++
    - os: osx
      compiler: clang
      env: HOPSAN_BUILD_QMAKE_SPEC=macx-clang
      install:
        - brew install qt
        - brew link --force qt
        - which qmake

# Build steps
script:
  - bash --version
  - echo OSType $OSTYPE
  - export QT_SELECT=4
  - cd Dependencies
  - ./setupDiscount.sh
  - ./setupFMILibrary.sh
  - ./setupQwt.sh
  - ./setupZeroMQ.sh
  - ./setupKatex.sh
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./setupPythonQt.sh release 2.7 3.0 ; fi
  - cd ..
  - mkdir -p build
  - cd build
  - source ../Dependencies/setHopsanBuildPaths.sh
  - ${HOPSAN_BUILD_QT_QMAKE} ../HopsanNG_remote.pro -r -spec ${HOPSAN_BUILD_QMAKE_SPEC} -config release
  - cd ..
  - make -j4 -C build
  - ./runUnitTests.sh
  - ./runValidationTests.sh
  - cd bin
  - ls -l
#  - otool -lv hopsancli
#  - otool -lv hopsangui
#  - otool -lv holc
#  - ./hopsangui ../Scripts/HCOM/exit.hcom

# Enable C++ support
language: cpp

matrix:
  include:
    - os: linux
      sudo: required
      dist: trusty
      compiler: gcc
      env:
        - QT_SELECT=4
        - HOPSAN_BUILD_QMAKE_SPEC=linux-g++
    - os: osx
      compiler: clang
      env:
        - HOPSAN_BUILD_QMAKE_SPEC=macx-clang
      install:
        - brew install qt
        - brew link --force qt
        - which qmake

# Build steps
script:
  - bash --version
  - echo OSType $OSTYPE
  - cd Dependencies
  - ./setupDiscount.sh
  - ./setupFMILibrary.sh
  - ./setupQwt.sh
  - ./setupZeroMQ.sh
  - ./setupKatex.sh
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./setupPythonQt.sh release 2.7 3.0 ; fi
  - cd ..
  - mkdir -p build
  - cd build
  - source ../Dependencies/setHopsanBuildPaths.sh
  - ${HOPSAN_BUILD_QT_QMAKE} ../HopsanNG_remote.pro -r -spec ${HOPSAN_BUILD_QMAKE_SPEC} -config release
  - cd ..
  - make -j4 -C build
  - ./runUnitTests.sh
  - ./runValidationTests.sh
  - cd bin
  - ls -l
#  - otool -lv hopsancli
#  - otool -lv hopsangui
#  - otool -lv holc
#  - ./hopsangui ../Scripts/HCOM/exit.hcom

Use QT_SELECT only for trusty
Use QT_SELECT only for trusty
