Files
opm-common/travis/build-prereqs.sh
Joakim Hove d1a3e4a872 Change ert -> libecl
- The travis build will use Statoi/libecl
 - The FindERT cmake module has been updated to look for both ert/ and
   libecl/
2017-04-18 20:32:02 +02:00

85 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
set -e
# This script should build all the OPM dependencies which are installed from source.
# The build_dune function should take the module name as the first
# argument. By default the script will clone the source from:
#
# https://github.com/dune-project/${project}.git
#
# But you can optionally supply a git url as second argument, i.e.
#
# build_dune dune-alugrid https://gitlab.dune-project.org/extensions/dune-alugrid.git
#
# to build the dune-alugrid module which is not found at github.
function build_dune {
project=$1
if [[ $# -eq 1 ]]; then
url=https://github.com/dune-project/${project}.git
else
url=$2
fi
pushd . > /dev/null
git clone ${url}
cd ${project}
git checkout tags/v2.3.1
mkdir build
cd build
cmake ../
make
popd > /dev/null
}
function build_superlu {
pushd . > /dev/null
git clone https://github.com/starseeker/SuperLU.git
cd SuperLU
mkdir build
cd build
cmake -D CMAKE_INSTALL_PREFIX=.. -D SUPERLU_BUILD_EXAMPLES=OFF -D SUPERLU_ENABLE_TESTING=OFF ../
make install
popd > /dev/null
}
function install_python_deps {
export TRAVIS_PYTHON_VERSION="2.7"
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda
export CONDA_HOME="$HOME/miniconda"
export PATH="$CONDA_HOME/bin:$PATH"
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda install numpy
}
function build_libecl {
install_python_deps
git clone https://github.com/Statoil/libecl.git
mkdir -p libecl/build
pushd libecl/build > /dev/null
cmake .. && make
popd > /dev/null
}
#################################################################
build_superlu
build_libecl
build_dune dune-common
build_dune dune-istl
build_dune dune-geometry
build_dune dune-grid
build_dune dune-localfunctions