Skip to content
Snippets Groups Projects
Commit a51b1eed authored by Lars Bilke's avatar Lars Bilke
Browse files
parent 92b2f8ee
No related branches found
No related tags found
No related merge requests found
sudo: false
language: cpp
compiler:
- gcc
- clang
cache:
- apt
env:
- CASE=CLI CMAKE_ARGS="-DOGS_BUILD_GUI=OFF -DOGS_BUILD_UTILS=ON"
- CASE=CLI_PETSC CMAKE_ARGS="-DOGS_BUILD_GUI=OFF -DOGS_BUILD_UTILS=OFF -DOGS_USE_PETSC=ON -DPETSC_DIR=/usr/lib/petscdir/3.4.2/"
- CASE=GUI CMAKE_ARGS="-DOGS_BUILD_GUI=ON"
before_install:
# -- External package sources --
- travis_retry sudo add-apt-repository --yes ppa:boost-latest
- travis_retry sudo apt-get install python-software-properties
- travis_retry sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- if [[ "$CASE" == "CLI_PETSC" ]]; then sudo add-apt-repository --yes ppa:feelpp/petsc; fi
- travis_retry sudo apt-get update -qq;
# GCC 4.8
- travis_retry sudo apt-get install -qq g++-4.8
- export CXX="g++-4.8" CC="gcc-4.8"
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90
addons:
apt:
sources:
- boost-latest
- ubuntu-toolchain-r-test
# TODO: feelpp/petsc
packages:
- g++-4.8
- libeigen3-dev
- libboost1.55-dev
- libboost-date-time1.55-dev
- libboost-filesystem1.55-dev
- libboost-program-options1.55-dev
- libboost-system1.55-dev
- qt4-dev-tools
- libxt-dev
# TODO
# - libpetsc3.4.2-dev
# Not allowed yet:
# - numdiff
# - libshp-dev
# - libgeotiff-dev
install:
# -- Install packages --
- travis_retry sudo apt-get install -qq libeigen3-dev numdiff
# Boost
- travis_retry sudo apt-get install -qq libboost1.55-dev libboost-date-time1.55-dev libboost-filesystem1.55-dev libboost-program-options1.55-dev libboost-system1.55-dev
# Eigen
- travis_retry wget http://bitbucket.org/eigen/eigen/get/3.2.5.tar.gz
- tar -xzf 3.2.5.tar.gz
- sudo cp -fR eigen-eigen-bdd17ee3b1b3/* /usr/include/eigen3/
# CMake
- travis_retry wget http://www.cmake.org/files/v3.1/cmake-3.1.1-Linux-x86_64.tar.gz
- tar -xzf cmake-3.1.1-Linux-x86_64.tar.gz
- sudo cp -fR cmake-3.1.1-Linux-x86_64/* /usr
- rm -rf cmake-3.1.1-Linux-x86_64.tar.gz cmake-3.1.1-Linux-x86_64
cache:
directories:
- $HOME/cmake-3.1.1-Linux-x86_64
- $HOME/VTK-Install
# Qt
- if [[ "$CASE" == "GUI" ]]; then travis_retry sudo apt-get install -qq qt4-dev-tools libshp-dev libgeotiff-dev libxt-dev; fi
env:
global:
- VTK_DIR=VTK-Install/lib/cmake/vtk-6.1
matrix:
- CASE=CLI CMAKE_ARGS="-DOGS_BUILD_GUI=OFF -DOGS_BUILD_UTILS=ON -DVTK_DIR=$HOME/$VTK_DIR"
# - CASE=CLI_PETSC CMAKE_ARGS="-DOGS_BUILD_GUI=OFF -DOGS_BUILD_UTILS=OFF -DOGS_USE_PETSC=ON -DPETSC_DIR=/usr/lib/petscdir/3.4.2/"
- CASE=GUI CMAKE_ARGS="-DOGS_BUILD_GUI=ON -DOGS_BUILD_CLI=OFF -DOGS_BUILD_TESTS=OFF -DVTK_DIR=$HOME/$VTK_DIR"
# VTK
- travis_retry wget http://www.opengeosys.org/images/dev/vtk-6.1.0.tar.gz
- tar -xzf vtk-6.1.0.tar.gz
- sudo cp -fR VTK-Install/* /usr
- rm -rf vtk-6.1.0.tar.gz VTK-Install
before_install:
- bash scripts/travis/cmake.sh
- bash scripts/travis/vtk.sh
# PetSc
- if [[ "$CASE" == "CLI_PETSC" ]]; then travis_retry sudo apt-get install -qq libpetsc3.4.2-dev; fi
before_script:
- export PATH=$HOME/cmake-3.1.1-Linux-x86_64/bin:$PATH
- export CXX=g++-4.8 CC=gcc-4.8
script:
- mkdir build
- cd build
- cmake $CMAKE_ARGS ..
- make
- make tests
- make -j 2
- if [[ "$CASE" == "CLI" ]]; then make tests; fi
# PetSc
- if [[ "$CASE" == "CLI_PETSC" ]]; then make tests_mpi; fi
#- if [[ "$CASE" == "CLI_PETSC" ]]; then make tests_mpi; fi
notifications:
hipchat:
......
......@@ -6,7 +6,7 @@ endif()
# First check for system Eigen
if(NOT EIGEN3_INCLUDE_DIR)
find_package(Eigen3)
find_package(Eigen3 3.2.5)
if(EIGEN3_FOUND)
set(EIGEN3_FOUND TRUE CACHE BOOL "Was Eigen found?" FORCE)
set(EIGEN3_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE STRING "Eigen include dir" FORCE)
......
#!/bin/sh
set -e
# check to see if cmake folder is empty
if [ ! -d "$HOME/cmake-3.1.1-Linux-x86_64/bin" ]; then
cd $HOME
wget http://www.cmake.org/files/v3.1/cmake-3.1.1-Linux-x86_64.tar.gz;
tar -xzvf cmake-3.1.1-Linux-x86_64.tar.gz;
else
echo 'Using cached cmake directory.';
fi
#!/bin/sh
set -e
if [ ! -d "$HOME/VTK-Install/include" ]; then
cd $HOME
wget http://www.opengeosys.org/images/dev/vtk-6.1.0.tar.gz
tar -xzf vtk-6.1.0.tar.gz
else
echo 'Using cached vtk directory.';
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment