language: cpp
compiler:
  - clang
  - gcc
os:
  - linux
  - osx
script:
  - mkdir build && cd build && cmake .. && make && make check

language: cpp
dist: xenial
osx_image: xcode8
compiler:
  - clang
  - gcc
os:
  - linux
  - osx
before_install:
  - PY_CMD=python
  - export PATH=$PATH:/Users/travis/Library/Python/2.7/bin
  - $PY_CMD -m pip install --user --upgrade pip wheel setuptools
  - $PY_CMD -m pip install --user  conan
  - if [ "$TRAVIS_OS_NAME" == "osx" -a "$CC" == "gcc" ]; then eval CC=gcc-4.9; export CXX=g++-4.9; fi
  - conan user
  - conan remote add worldforge https://api.bintray.com/conan/worldforge/worldforge-conan
script:
  - mkdir build && cd build
  - conan profile new default --detect
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" && "$CXX" == "clang++" ]]; then
      echo osx/clang autodetected libcxx is fine
      conan install ../tools/conan -pr default --build=missing
    else
      conan profile update settings.compiler.libcxx=libstdc++11 default
      conan install ../tools/conan -pr default --build=missing
    fi
  - cmake ..
  - make
  - make check
  - |
    if [[ x"$TRAVIS_OS_NAME" == x"osx" && "$CXX" == "clang++" ]]; then
      echo osx/clang autodetected libcxx is fine
      conan install ../tools/conan -pr default --build=missing
    else
      conan profile update settings.compiler.libcxx=libstdc++11 default
      conan install ../tools/conan -pr default --build=missing
    fi
  - if [ "$TRAVIS_OS_NAME" == "osx" -a "$CC" == "gcc" ]; then make dox; fi
  - |
    if [[ x"$CONAN_PASSWORD" != "x" && x"$CONAN_LOGIN_USERNAME" != "x" ]]; then
      echo "Creating and uploading Conan artifacts"
      conan user -p $CONAN_PASSWORD -r worldforge $CONAN_LOGIN_USERNAME
      conan create ../tools/conan worldforge/testing -pr default --build missing
      conan upload "atlas/*@worldforge/testing" -r worldforge -c --all
    fi

Create and upload Conan packages.
Create and upload Conan packages.
