mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
Merge pull request #186 from akva2/simplify_jenkins_build_scripts
simplify jenkins build scripts a little
This commit is contained in:
commit
80c47f8c66
@ -38,25 +38,7 @@ function build_opm_upscaling {
|
|||||||
test $? -eq 0 || exit 1
|
test $? -eq 0 || exit 1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Build opm-parser
|
build_upstreams
|
||||||
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 opm-upscaling
|
# Build opm-upscaling
|
||||||
pushd .
|
pushd .
|
||||||
|
@ -2,14 +2,22 @@
|
|||||||
|
|
||||||
source `dirname $0`/build-opm-upscaling.sh
|
source `dirname $0`/build-opm-upscaling.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
|
ERT_REVISION=master
|
||||||
OPM_COMMON_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_UPSCALING_REVISION=$sha1
|
|
||||||
|
|
||||||
if grep -q "ert=" <<< $ghprbCommentBody
|
if grep -q "ert=" <<< $ghprbCommentBody
|
||||||
then
|
then
|
||||||
@ -21,32 +29,15 @@ then
|
|||||||
OPM_COMMON_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge
|
OPM_COMMON_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -q "opm-parser=" <<< $ghprbCommentBody
|
for upstream in $upstreams
|
||||||
then
|
do
|
||||||
OPM_PARSER_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-parser=([0-9]+).*/\1/g'`/merge
|
if grep -q "$upstream=" <<< $ghprbCommentBody
|
||||||
fi
|
then
|
||||||
|
upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*$upstream=([0-9]+).*/\1/g"`/merge
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if grep -q "opm-material=" <<< $ghprbCommentBody
|
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-upscaling=$sha1"
|
||||||
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_REVSIION 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-upscaling=$OPM_UPSCALING_REVISION"
|
|
||||||
|
|
||||||
build_opm_upscaling
|
build_opm_upscaling
|
||||||
test $? -eq 0 || exit 1
|
test $? -eq 0 || exit 1
|
||||||
|
@ -2,13 +2,22 @@
|
|||||||
|
|
||||||
source `dirname $0`/build-opm-upscaling.sh
|
source `dirname $0`/build-opm-upscaling.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
|
ERT_REVISION=master
|
||||||
OPM_COMMON_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_upscaling
|
build_opm_upscaling
|
||||||
test $? -eq 0 || exit 1
|
test $? -eq 0 || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user