os:
  - linux
  # Disabled due to lack of OpenMP support in Travis' OSX environment
  # - osx

addons:
  apt:
    sources:
      - kubuntu-backports
    packages:
      - cmake

language: c

compiler:
  - gcc
  # No clang with OpenMP support until Ubuntu 16.04 (via libomp-dev)
  # - clang

install:
  # heartbeats-simple dependency
  - wget https://github.com/libheartbeats/heartbeats-simple/archive/master.zip
  - unzip master.zip
  - rm master.zip
  - cd heartbeats-simple-master
  - mkdir _build
  - cd _build
  - cmake -DCMAKE_INSTALL_PREFIX=_install ..
  - cmake --build . --target install
  - cd ../..
  # energymon dependency (use default dummy implementation)
  - wget https://github.com/energymon/energymon/archive/master.zip
  - unzip master.zip
  - rm master.zip
  - cd energymon-master
  - mkdir _build
  - cd _build
  - cmake -DCMAKE_INSTALL_PREFIX=_install ..
  - cmake --build . --target install
  - cd ../..

script:
  - mkdir _build
  - cd _build
  - PKG_CONFIG_PATH="../heartbeats-simple-master/_build/_install/lib/pkgconfig:../energymon-master/_build/_install/lib/pkgconfig" cmake ..
  - cmake --build .
  - ctest --verbose

dist: trusty
sudo: false

os:
  - linux
  # Disabled due to lack of OpenMP support in Travis' OSX environment
  # - osx

language: c

compiler:
  - gcc
  # No clang with OpenMP support until Ubuntu 16.04 (via libomp-dev)
  # - clang

install:
  - mkdir _dep_install
  # heartbeats-simple dependency
  - wget https://github.com/libheartbeats/heartbeats-simple/archive/master.zip
  - unzip master.zip
  - rm master.zip
  - mkdir heartbeats-simple-master/_build
  - cd heartbeats-simple-master/_build
  - cmake -DCMAKE_INSTALL_PREFIX=../../_dep_install ..
  - cmake --build . --target install
  - cd ../..
  # energymon dependency (use default dummy implementation)
  - wget https://github.com/energymon/energymon/archive/master.zip
  - unzip master.zip
  - rm master.zip
  - mkdir energymon-master/_build
  - cd energymon-master/_build
  - cmake -DCMAKE_INSTALL_PREFIX=../../_dep_install ..
  - cmake --build . --target install
  - cd ../..

script:
  - mkdir _build
  - cd _build
  - PKG_CONFIG_PATH="../_dep_install/lib/pkgconfig" cmake ..
  - cmake --build .
  - ctest -VV

Use Trusty container to get newer CMake version (lost support for CMake >=2.8.9 when Kubuntu pulled their backports for Precise when it reached EOL)
Use Trusty container to get newer CMake version (lost support for CMake >=2.8.9 when Kubuntu pulled their backports for Precise when it reached EOL)
