message: Build avogadrolibs with travis-ci
diff: -sudo: false
  branches:
  only:
  - master
  -language: python
  -python:
  - - "2.7"
  +
  +matrix:
  + include:
  + - language: python
  + sudo: false
  + python: 2.7
  + env: TASKS="clang-format"
  dist: precise
  addons:
  @@ -17,3 +20,52 @@ addons:
  script:
  - cd $TRAVIS_BUILD_DIR
  - ./scripts/travis/run_clang_format_diff.sh master $TRAVIS_COMMIT
  +
  + - language: cpp
  + sudo: true
  + env: TASKS="ctest"
  + before_install:
  + - sudo add-apt-repository ppa:beineri/opt-qt542-trusty -y
  + - sudo apt-get update -qq
  + install:
  + - sudo apt-get install -qq qt54base
  + - source /opt/qt54/bin/qt54-env.sh
  + - sudo apt-get install libeigen3-dev libglew-dev libhdf5-dev libxml2-dev zlib1g-dev
  +
  + # We have to use cmake > 3.3, which cannot be easily installed with
  + # apt-get...
  + - cd ..
  + - export CMAKE_NAME="cmake-3.10.0-Linux-x86_64"
  + - wget https://cmake.org/files/v3.10/${CMAKE_NAME}.tar.gz
  + - tar -xzf ${CMAKE_NAME}.tar.gz
  + - export CMAKE_EXE=${PWD}/${CMAKE_NAME}/bin/cmake
  + - cd avogadrolibs
  +
  + before_script:
  + # First, get the super module dir
  + - cd ..
  + - git clone https://github.com/openchemistry/openchemistry
  + - cd openchemistry
  + - git submodule init avogadroapp avogadrodata molequeue
  + - git submodule update
  +
  + # Move the trial avogadrolibs into the open chemistry dir
  + - mv ../avogadrolibs .
  +
  + - mkdir build
  + - cd build
  +
  + # CMake flags
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DENABLE_TESTING=OFF"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_EIGEN=ON"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_GLEW=ON"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_GTEST=OFF"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_HDF5=ON"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_LIBXML2=ON"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_OPENBABEL=ON"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_PCRE=OFF"
  + - export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_SYSTEM_ZLIB=ON"
  +
  + script:
  + - ${CMAKE_EXE} ${CMAKE_FLAGS} ..
  + - make -j2
  