mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-29 20:43:49 -06:00
Merge pull request #673 from akva2/simplify_jenkins_build_scripts
simplify jenkins build scripts a little
This commit is contained in:
commit
60b00a0ddf
@ -38,25 +38,8 @@ function build_opm_simulators {
|
||||
test $? -eq 0 || exit 1
|
||||
popd
|
||||
|
||||
# Build opm-parser
|
||||
clone_and_build_module opm-parser "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_PARSER_REVISION $WORKSPACE/serial
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
# Build opm-material
|
||||
clone_and_build_module opm-material "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_MATERIAL_REVISION $WORKSPACE/serial
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
# Build opm-core
|
||||
clone_and_build_module opm-core "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_CORE_REVISION $WORKSPACE/serial
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
# Build opm-grid
|
||||
clone_and_build_module opm-grid "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_GRID_REVISION $WORKSPACE/serial
|
||||
test $? -eq 0 || exit 1
|
||||
|
||||
# Build opm-output
|
||||
clone_and_build_module opm-output "-DCMAKE_PREFIX_PATH=$WORKSPACE/serial/install -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" $OPM_OUTPUT_REVISION $WORKSPACE/serial
|
||||
test $? -eq 0 || exit 1
|
||||
# Build upstreams
|
||||
build_upstreams
|
||||
|
||||
# Setup opm-data
|
||||
source $WORKSPACE/deps/opm-common/jenkins/setup-opm-data.sh
|
||||
|
@ -2,14 +2,22 @@
|
||||
|
||||
source `dirname $0`/build-opm-simulators.sh
|
||||
|
||||
declare -a upstreams
|
||||
upstreams=(opm-parser
|
||||
opm-material
|
||||
opm-core
|
||||
opm-grid
|
||||
opm-output)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[opm-parser]=master
|
||||
upstreamRev[opm-material]=master
|
||||
upstreamRev[opm-core]=master
|
||||
upstreamRev[opm-grid]=master
|
||||
upstreamRev[opm-output]=master
|
||||
|
||||
ERT_REVISION=master
|
||||
OPM_COMMON_REVISION=master
|
||||
OPM_PARSER_REVISION=master
|
||||
OPM_MATERIAL_REVISION=master
|
||||
OPM_CORE_REVISION=master
|
||||
OPM_GRID_REVISION=master
|
||||
OPM_OUTPUT_REVISION=master
|
||||
OPM_SIMULATORS_REVISION=$sha1
|
||||
|
||||
if grep -q "ert=" <<< $ghprbCommentBody
|
||||
then
|
||||
@ -21,32 +29,15 @@ then
|
||||
OPM_COMMON_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
|
||||
if grep -q "opm-parser=" <<< $ghprbCommentBody
|
||||
then
|
||||
OPM_PARSER_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-parser=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
for upstream in $upstreams
|
||||
do
|
||||
if grep -q "$upstream=" <<< $ghprbCommentBody
|
||||
then
|
||||
upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*$upstream=([0-9]+).*/\1/g"`/merge
|
||||
fi
|
||||
done
|
||||
|
||||
if grep -q "opm-material=" <<< $ghprbCommentBody
|
||||
then
|
||||
OPM_MATERIAL_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-material=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
|
||||
if grep -q "opm-core=" <<< $ghprbCommentBody
|
||||
then
|
||||
OPM_CORE_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-core=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
|
||||
if grep -q "opm-grid=" <<< $ghprbCommentBody
|
||||
then
|
||||
OPM_GRID_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-grid=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
|
||||
if grep -q "opm-output=" <<< $ghprbCommentBody
|
||||
then
|
||||
OPM_OUTPUT_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-output=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
|
||||
echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=$OPM_PARSER_REVISION opm-material=$OPM_MATERIAL_REVISION opm-core=$OPM_CORE_REVISION opm-grid=$OPM_GRID_REVISION opm-output=$OPM_OUTPUT_REVISION opm-simulators=$OPM_SIMULATORS_REVISION"
|
||||
echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=${upstreamRev[opm-parser]} opm-material=${upstreamRev[opm-material]} opm-core=${upstreamRev[opm-core]} opm-grid=${upstreamRev[opm-grid]} opm-output=${upstreamRev[opm-output]} opm-simulators=$sha1"
|
||||
|
||||
build_opm_simulators
|
||||
test $? -eq 0 || exit 1
|
||||
|
@ -2,13 +2,22 @@
|
||||
|
||||
source `dirname $0`/build-opm-simulators.sh
|
||||
|
||||
declare -a upstreams
|
||||
upstreams=(opm-parser
|
||||
opm-material
|
||||
opm-core
|
||||
opm-grid
|
||||
opm-output)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[opm-parser]=master
|
||||
upstreamRev[opm-material]=master
|
||||
upstreamRev[opm-core]=master
|
||||
upstreamRev[opm-grid]=master
|
||||
upstreamRev[opm-output]=master
|
||||
|
||||
ERT_REVISION=master
|
||||
OPM_COMMON_REVISION=master
|
||||
OPM_PARSER_REVISION=master
|
||||
OPM_MATERIAL_REVISION=master
|
||||
OPM_CORE_REVISION=master
|
||||
OPM_GRID_REVISION=master
|
||||
OPM_OUTPUT_REVISION=master
|
||||
|
||||
build_opm_simulators
|
||||
test $? -eq 0 || exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user