simplify jenkins build scripts after ert reorganization
This commit is contained in:
parent
a6a95eeac1
commit
8ea0b62b33
@ -1,25 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
function build_opm_core {
|
||||
# Build ERT
|
||||
pushd .
|
||||
mkdir -p $WORKSPACE/deps/ert
|
||||
cd $WORKSPACE/deps/ert
|
||||
git init .
|
||||
git remote add origin https://github.com/Ensembles/ert
|
||||
git fetch --depth 1 origin $ERT_REVISION:branch_to_build
|
||||
test $? -eq 0 || exit 1
|
||||
git checkout branch_to_build
|
||||
popd
|
||||
|
||||
pushd .
|
||||
mkdir -p serial/build-ert
|
||||
cd serial/build-ert
|
||||
cmake $WORKSPACE/deps/ert/devel -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install
|
||||
cmake --build . --target install
|
||||
test $? -eq 0 || exit 1
|
||||
popd
|
||||
|
||||
# Build opm-common
|
||||
pushd .
|
||||
mkdir -p $WORKSPACE/deps/opm-common
|
||||
@ -30,10 +11,11 @@ function build_opm_core {
|
||||
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
|
||||
mkdir -p serial/build-opm-common
|
||||
cd serial/build-opm-common
|
||||
build_module "-DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install" 0 $WORKSPACE/deps/opm-common
|
||||
popd
|
||||
|
@ -4,23 +4,19 @@ source `dirname $0`/build-opm-core.sh
|
||||
|
||||
# Upstream revisions
|
||||
declare -a upstreams
|
||||
upstreams=(opm-parser
|
||||
upstreams=(ert
|
||||
opm-parser
|
||||
opm-material
|
||||
opm-output)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[ert]=master
|
||||
upstreamRev[opm-parser]=master
|
||||
upstreamRev[opm-material]=master
|
||||
upstreamRev[opm-output]=master
|
||||
|
||||
ERT_REVISION=master
|
||||
OPM_COMMON_REVISION=master
|
||||
|
||||
if grep -q "ert=" <<< $ghprbCommentBody
|
||||
then
|
||||
ERT_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*ert=([0-9]+).*/\1/g'`/merge
|
||||
fi
|
||||
|
||||
if grep -q "opm-common=" <<< $ghprbCommentBody
|
||||
then
|
||||
OPM_COMMON_REVISION=pull/`echo $ghprbCommentBody | sed -r 's/.*opm-common=([0-9]+).*/\1/g'`/merge
|
||||
@ -34,7 +30,7 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Building with ert=$ERT_REVISION opm-common=$OPM_COMMON_REVISION opm-parser=${upstreamRev[opm-parser]} opm-material=${upstreamRev[opm-material]} opm-output=${upstreamRev[opm-output]} opm-core=$sha1"
|
||||
echo "Building with opm-common=$OPM_COMMON_REVISION ert=${upstreamRev[ert]} opm-parser=${upstreamRev[opm-parser]} opm-material=${upstreamRev[opm-material]} opm-output=${upstreamRev[opm-output]} opm-core=$sha1"
|
||||
|
||||
build_opm_core
|
||||
test $? -eq 0 || exit 1
|
||||
|
@ -4,16 +4,17 @@ source `dirname $0`/build-opm-core.sh
|
||||
|
||||
# Upstream revisions
|
||||
declare -a upstreams
|
||||
upstreams=(opm-parser
|
||||
upstreams=(ert
|
||||
opm-parser
|
||||
opm-material
|
||||
opm-output)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[ert]=master
|
||||
upstreamRev[opm-parser]=master
|
||||
upstreamRev[opm-material]=master
|
||||
upstreamRev[opm-output]=master
|
||||
|
||||
ERT_REVISION=master
|
||||
OPM_COMMON_REVISION=master
|
||||
|
||||
build_opm_core
|
||||
|
Loading…
Reference in New Issue
Block a user