It seems like OPM support for Dune 2.3 is going to be removed sooner rather than later. Also, all relevant distributions which I'm aware of seem to ship at least Dune-2.4 packages. note that this patch switches to Dune 2.4.1 instead of the latest Dune 2.4 release (i.e., 2.4.2) because travis seems to block downloads from sites it does not know -- in this case dune-project.org -- and the Dune github mirrors seem to have been abandoned a few months ago and thus do not feature dune 2.4.2.
85 lines
1.9 KiB
Bash
Executable File
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.4.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
|