# Use trusty
dist: trusty
sudo: required

# Enable C++ support
language: cpp

# Compiler selection
compiler:
  - gcc
#  - clang

# Build steps
script:
  - export QT_SELECT=4
  - cd Dependencies
  - ./setupDiscount.sh
  - ./setupFMILibrary.sh
  - ./setupQwt.sh
  - ./setupZeroMQ.sh
  - ./setupKatex.sh
  - ./setupPythonQt.sh release 2.7 3.0
  - cd ..
  - mkdir -p build
  - cd build
  - source ../Dependencies/setHopsanBuildPaths.sh
  - ${hopsan_qt_qmake} ../HopsanNG_remote.pro -r -spec linux-g++ -config release
  - cd ..
  - make -j4 -C build
  - ./runUnitTests.sh
  - ./runValidationTests.sh

# Use trusty

# Enable C++ support
language: cpp

matrix:
  include:
    - os: linux
      sudo: required
      dist: trusty
      compiler: gcc
      env: HOPSAN_QMAKE_SPEC=linux-g++
    - os: osx
      compiler: clang
      env: HOPSAN_QMAKE_SPEC=mac-gcc

# Build steps
script:
  - 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_qt_qmake} ../HopsanNG_remote.pro -r -spec ${HOPSAN_QMAKE_SPEC} -config release
  - cd ..
  - make -j4 -C build
  - ./runUnitTests.sh
  - ./runValidationTests.sh

Use build matrix that include linux (gcc) and osx (clang)
Use build matrix that include linux (gcc) and osx (clang)
