Skip to content

Commit

Permalink
Add travis integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlevy committed May 19, 2018
1 parent 918e4e5 commit d0108da
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
!ACKNOWLEDGE.TXT
!COPYRIGHT.TXT
!HEADER.TXT
!.travis.yml
!scripts/
!test/gtest*

Expand Down
75 changes: 75 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#based on ALPSCore/CT-HYB .travis.yml
language: cpp
sudo: required
dist: trusty

compiler:
- gcc
- clang

branches:
only:
- master
- GPLv3
#- travis # To debug .travis.yml

addons:
apt:
sources:
# Boost 1.58
- sourceline: ppa:kzemek/boost
packages:
- libboost1.58-dev
- libboost-program-options1.58-dev
- libboost-program-options1.58.0
- openmpi-bin
- openmpi-common
- openmpi-doc
- libopenmpi-dev
- libhdf5-serial-dev
- gsl-bin
- libgsl0-dev

install: true

before_script:
- export OMPI_CC=${CC}
- export OMPI_CXX=${CXX}
- export LD_LIBRARY_PATH=/usr/local/lib/:${LD_LIBRARY_PATH}

script:
# Stop on first error
- set -e

# Create directory for installed prerequisites
- export PREREQS_DIR=$(readlink -f $TRAVIS_BUILD_DIR/../installed)
- mkdir $PREREQS_DIR

# Install ALPSCore wo tests
- cd $TRAVIS_BUILD_DIR/..
- git clone https://github.com/ALPSCore/ALPSCore.git ALPSCore.git
- mkdir ALPSCore.build && pushd ALPSCore.build
- |
cmake ../ALPSCore.git \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_INSTALL_PREFIX=$PREREQS_DIR/ALPSCore \
-DALPS_INSTALL_EIGEN=true \
-DTesting=false \
-DENABLE_MPI=ON
- make -j3
- make install
- export ALPSCore_DIR=$PREREQS_DIR/ALPSCore

# Build and test Maxent
- cd $TRAVIS_BUILD_DIR/..
- mkdir build
- cd build
- |
cmake ../Maxent \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=mpicc \
-DCMAKE_CXX_COMPILER=mpic++ \
-DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/installed \
- make -j3
- make test

0 comments on commit d0108da

Please sign in to comment.