mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-21 16:57:25 -06:00
38 lines
983 B
Bash
Executable File
38 lines
983 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function build_opm_simulators {
|
|
# 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
|
|
git fetch --depth 1 origin $OPM_COMMON_REVISION:branch_to_build
|
|
test $? -eq 0 || exit 1
|
|
git checkout branch_to_build
|
|
popd
|
|
|
|
source $WORKSPACE/deps/opm-common/jenkins/build-opm-module.sh
|
|
|
|
pushd .
|
|
mkdir -p serial/build-opm-common
|
|
cd serial/build-opm-common
|
|
build_module "-DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" 0 $WORKSPACE/deps/opm-common
|
|
test $? -eq 0 || exit 1
|
|
popd
|
|
|
|
# Build upstreams
|
|
build_upstreams
|
|
|
|
# Setup opm-data
|
|
source $WORKSPACE/deps/opm-common/jenkins/setup-opm-data.sh
|
|
|
|
# Build opm-simulators
|
|
pushd .
|
|
mkdir serial/build-opm-simulators
|
|
cd serial/build-opm-simulators
|
|
build_module "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DOPM_DATA_ROOT=$OPM_DATA_ROOT" 1 $WORKSPACE
|
|
test $? -eq 0 || exit 1
|
|
popd
|
|
}
|