mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-15 23:21:56 -06:00
Merge pull request #796 from akva2/simplify_after_ert_reorg
simplify jenkins build scripts after ert reorganization
This commit is contained in:
commit
71491cac6c
@ -1,24 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
function build_opm_simulators {
|
||||
# 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 -DBUILD_APPLICATIONS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$WORKSPACE/serial/install
|
||||
cmake --build . --target install
|
||||
popd
|
||||
|
||||
# Build opm-common
|
||||
pushd .
|
||||
mkdir -p $WORKSPACE/deps/opm-common
|
||||
@ -29,10 +11,11 @@ function build_opm_simulators {
|
||||
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
|
||||
test $? -eq 0 || exit 1
|
||||
|
@ -3,27 +3,23 @@
|
||||
source `dirname $0`/build-opm-simulators.sh
|
||||
|
||||
declare -a upstreams
|
||||
upstreams=(opm-parser
|
||||
upstreams=(ert
|
||||
opm-parser
|
||||
opm-output
|
||||
opm-material
|
||||
opm-core
|
||||
opm-grid)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[ert]=master
|
||||
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
|
||||
|
||||
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
|
||||
@ -37,7 +33,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-core=${upstreamRev[opm-core]} opm-grid=${upstreamRev[opm-grid]} opm-output=${upstreamRev[opm-output]} opm-simulators=$sha1"
|
||||
echo "Building with opm-common=$OPM_COMMON_REVISION ert=${upstreamRev[ert]} 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
|
||||
|
@ -3,20 +3,21 @@
|
||||
source `dirname $0`/build-opm-simulators.sh
|
||||
|
||||
declare -a upstreams
|
||||
upstreams=(opm-parser
|
||||
upstreams=(ert
|
||||
opm-parser
|
||||
opm-output
|
||||
opm-material
|
||||
opm-core
|
||||
opm-grid)
|
||||
|
||||
declare -A upstreamRev
|
||||
upstreamRev[ert]=master
|
||||
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
|
||||
|
||||
build_opm_simulators
|
||||
|
Loading…
Reference in New Issue
Block a user