language: cpp

dist: trusty

jobs:
  include:
    - os: linux
      compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
      env: COMPILER=g++-5
    - os: linux
      compiler: clang
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      env: COMPILER=clang++-3.7
    - os: osx
      compiler: clang
      osx_image: xcode8.3
      env: COMPILER=clang++

before_script:
  - cmake --version

script:
  - mkdir build
  - cd build
  - cmake -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_CXX_COMPILER=$COMPILER -DENABLE_TESTING=ON ..
  - make -j2
  - tests/dump_sizeof
  - tests/dump_layout
  - ctest --output-on-failure

notifications:
  email: false
