From 47778333bcf34f4562dfb488ba7342f2a652bbd0 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Fri, 1 Jul 2016 17:01:02 +0200 Subject: [PATCH] Installing numpy using conda before building ert. --- travis/build-and-test.sh | 6 +++++- travis/build-prereqs.sh | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/travis/build-and-test.sh b/travis/build-and-test.sh index 4da0059f3..e7c352aaa 100755 --- a/travis/build-and-test.sh +++ b/travis/build-and-test.sh @@ -25,7 +25,6 @@ build_order=(opm-common opm-parser opm-material opm-output opm-core opm-grid opm # This can typically be achived by using the 'clone-opm.sh' script. - function upstream_build { project=${1} echo "Building: ${project}" @@ -51,6 +50,11 @@ function downstream_build_and_test { popd > /dev/null } +#----------------------------------------------------------------- + +export CONDA_HOME="$HOME/miniconda" +export PATH="$CONDA_HOME/bin:$PATH" + for i in "${!build_order[@]}"; do if [[ "${build_order[$i]}" = "$1" ]]; then diff --git a/travis/build-prereqs.sh b/travis/build-prereqs.sh index 08d857b99..43d92583d 100755 --- a/travis/build-prereqs.sh +++ b/travis/build-prereqs.sh @@ -47,8 +47,23 @@ function build_superlu { } +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_ert { + install_python_deps git clone https://github.com/Ensembles/ert.git mkdir -p ert/build pushd ert/build > /dev/null