2016-04-04 10:35:23 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-04-08 07:58:07 -05:00
|
|
|
function build_opm_simulators {
|
2016-04-04 10:35:23 -05:00
|
|
|
# Build ERT
|
|
|
|
pushd .
|
|
|
|
mkdir -p $WORKSPACE/deps/ert
|
|
|
|
cd $WORKSPACE/deps/ert
|
|
|
|
git init .
|
|
|
|
git remote add origin https://github.com/Ensembles/ert
|
2016-04-06 03:15:46 -05:00
|
|
|
git fetch --depth 1 origin $ERT_REVISION:branch_to_build
|
2016-04-04 10:35:23 -05:00
|
|
|
test $? -eq 0 || exit 1
|
|
|
|
git checkout branch_to_build
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd .
|
|
|
|
mkdir -p serial/build-ert
|
|
|
|
cd serial/build-ert
|
2016-04-05 02:14:39 -05:00
|
|
|
cmake $WORKSPACE/deps/ert/devel -DBUILD_APPLICATIONS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install
|
2016-04-04 10:35:23 -05:00
|
|
|
cmake --build . --target install
|
|
|
|
popd
|
|
|
|
|
|
|
|
# Build opm-common
|
|
|
|
pushd .
|
|
|
|
mkdir -p $WORKSPACE/deps/opm-common
|
|
|
|
cd $WORKSPACE/deps/opm-common
|
|
|
|
git init .
|
|
|
|
git remote add origin https://github.com/OPM/opm-common
|
2016-04-06 03:15:46 -05:00
|
|
|
git fetch --depth 1 origin $OPM_COMMON_REVISION:branch_to_build
|
2016-04-04 10:35:23 -05:00
|
|
|
test $? -eq 0 || exit 1
|
|
|
|
git checkout branch_to_build
|
|
|
|
popd
|
|
|
|
source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh
|
|
|
|
|
|
|
|
pushd .
|
|
|
|
mkdir serial/build-opm-common
|
|
|
|
cd serial/build-opm-common
|
|
|
|
build_module "-DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" 0 $WORKSPACE/deps/opm-common
|
2016-04-06 03:15:46 -05:00
|
|
|
test $? -eq 0 || exit 1
|
2016-04-04 10:35:23 -05:00
|
|
|
popd
|
|
|
|
|
2016-04-30 03:00:57 -05:00
|
|
|
# Build upstreams
|
|
|
|
build_upstreams
|
2016-04-04 10:35:23 -05:00
|
|
|
|
2016-04-11 05:16:21 -05:00
|
|
|
# Setup opm-data
|
|
|
|
source $WORKSPACE/deps/opm-common/jenkins/setup-opm-data.sh
|
|
|
|
|
2016-04-08 07:58:07 -05:00
|
|
|
# Build opm-simulators
|
2016-04-04 10:35:23 -05:00
|
|
|
pushd .
|
2016-04-08 07:58:07 -05:00
|
|
|
mkdir serial/build-opm-simulators
|
|
|
|
cd serial/build-opm-simulators
|
2016-04-11 05:16:21 -05:00
|
|
|
build_module "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DOPM_DATA_ROOT=$OPM_DATA_ROOT" 1 $WORKSPACE
|
2016-04-06 03:15:46 -05:00
|
|
|
test $? -eq 0 || exit 1
|
2016-04-04 10:35:23 -05:00
|
|
|
popd
|
|
|
|
}
|