diff --git a/scripts/jenkins/docs.groovy b/scripts/jenkins/docs.groovy index 86213d2ea4f6753e29d8f087dd1450ac57cb7f71..503378314e57616bdda43da67fcf80cedc26f106 100644 --- a/scripts/jenkins/docs.groovy +++ b/scripts/jenkins/docs.groovy @@ -12,11 +12,11 @@ def image = docker.image('ogs6/gcc-latex:latest') image.pull() image.inside() { stage('Configure (Docs)') { - configure.linux 'build', "${defaultCMakeOptions}" + configure.linux(cmakeOptions: defaultCMakeOptions, script: this) } stage('Generate (Docs)') { - build.linux 'build', 'doc' + build.linux(script: this, target: 'doc') } } diff --git a/scripts/jenkins/gcc-dynamic.groovy b/scripts/jenkins/gcc-dynamic.groovy index e65e32c77e9d4ffebaa0d476b812c66ad0f22f25..d213d050951ed46f5ab34b2a4a02176317953888 100644 --- a/scripts/jenkins/gcc-dynamic.groovy +++ b/scripts/jenkins/gcc-dynamic.groovy @@ -11,15 +11,15 @@ def post = new ogs.post() def helper = new ogs.helper() stage('Configure (Linux-Docker-Dynamic)') { - configure.linuxWithEnv('envinf1/cli.sh', 'build', "${defaultCMakeOptions}") + configure.linux(cmakeOptions: defaultCMakeOptions, env: 'envinf1/cli.sh', script: this) } stage('CLI (Linux-Docker-Dynamic)') { - build.linuxWithEnv('envinf1/cli.sh', 'build') + build.linux(env: 'envinf1/cli.sh', script: this) } stage('Test (Linux-Docker-Dynamic)') { - build.linuxWithEnv('envinf1/cli.sh', 'build', 'tests ctest') + build.linux(env: 'envinf1/cli.sh', script: this, target: 'tests ctest') } stage('Post (Linux-Docker-Dynamic)') { diff --git a/scripts/jenkins/gcc-tests-large.groovy b/scripts/jenkins/gcc-tests-large.groovy index c95acb84d5eb5e6cc70a14cd1ada8ab00c24b4d6..5e269dbc3bdd8c13ec05fafff8ec877f96f59bb0 100644 --- a/scripts/jenkins/gcc-tests-large.groovy +++ b/scripts/jenkins/gcc-tests-large.groovy @@ -15,9 +15,9 @@ node('docker') { def image = docker.image('ogs6/gcc-gui:latest') image.pull() image.inside(defaultDockerArgs) { - stage('Configure') { configure.linux 'build', "${defaultCMakeOptions}" } - stage('Build') { build.linux 'build' } - stage('Test') { build.linux 'build', 'tests ctest-large' } + stage('Configure') { configure.linux(cmakeOptions: defaultCMakeOptions, script: this) } + stage('Build') { build.linux(script: this) } + stage('Test') { build.linux(script: this, target: 'tests ctest-large') } } stage('Post') { diff --git a/scripts/jenkins/gcc.groovy b/scripts/jenkins/gcc.groovy index 1d1b74ed2486faa06e165074a1c2a13572c9ef4c..5d5c48d5843d9ef7c0e9bf07005232e9a3f79e85 100644 --- a/scripts/jenkins/gcc.groovy +++ b/scripts/jenkins/gcc.groovy @@ -2,7 +2,14 @@ def defaultDockerArgs = '-v /home/jenkins/.ccache:/usr/src/.ccache' def defaultCMakeOptions = '-DCMAKE_BUILD_TYPE=Release ' + '-DOGS_LIB_BOOST=System ' + - '-DOGS_LIB_VTK=System' + '-DOGS_LIB_VTK=System ' + +def guiCMakeOptions = + '-DOGS_BUILD_CLI=OFF ' + + '-DOGS_BUILD_GUI=ON ' + + '-DOGS_BUILD_UTILS=ON ' + + '-DOGS_BUILD_TESTS=OFF ' + + '-DOGS_BUILD_METIS=ON ' def configure = new ogs.configure() def build = new ogs.build() @@ -13,23 +20,24 @@ def image = docker.image('ogs6/gcc-gui:latest') image.pull() image.inside(defaultDockerArgs) { stage('Configure (Linux-Docker)') { - configure.linux 'build', "${defaultCMakeOptions}" + configure.linux(cmakeOptions: defaultCMakeOptions, script: this) } stage('CLI (Linux-Docker)') { - build.linux 'build' + build.linux(script: this) } stage('Test (Linux-Docker)') { - build.linux 'build', 'tests ctest' + build.linux(script: this, target: 'tests ctest') } stage('Data Explorer (Linux-Docker)') { - configure.linux 'build', "${defaultCMakeOptions} " + - '-DOGS_BUILD_CLI=OFF -DOGS_BUILD_GUI=ON -DOGS_BUILD_UTILS=ON ' + - '-DOGS_BUILD_TESTS=OFF -DOGS_BUILD_METIS=ON', - 'Unix Makefiles', null, true - build.linux 'build' + configure.linux( + cmakeOptions: defaultCMakeOptions + guiCMakeOptions, + keepDir: true, + script: this + ) + build.linux(script: this) } } diff --git a/scripts/jenkins/mac.groovy b/scripts/jenkins/mac.groovy index 7dedbfe75218943aefa560e0e7937fa461bd7c1f..1d3778282e0280f2e1d0b3c6034b3e215514443e 100644 --- a/scripts/jenkins/mac.groovy +++ b/scripts/jenkins/mac.groovy @@ -4,7 +4,13 @@ def defaultCMakeOptions = '-DOGS_LIB_BOOST=System' + '-DOGS_LIB_VTK=System ' + '-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON ' + - '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.11"' + '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" ' + +def guiCMakeOptions = + '-DOGS_BUILD_GUI=ON ' + + '-DOGS_BUILD_UTILS=ON ' + + '-DOGS_BUILD_TESTS=OFF ' + + '-DOGS_BUILD_METIS=ON ' def configure = new ogs.configure() def build = new ogs.build() @@ -12,23 +18,30 @@ def post = new ogs.post() def helper = new ogs.helper() stage('Configure (Mac)') { - configure.linux 'build', "${defaultCMakeOptions}", 'Ninja', '' + configure.linux( + cmakeOptions: defaultCMakeOptions, + generator: 'Ninja', + script: this, + useConan: true + ) } stage('CLI (Mac)') { - build.linux 'build', null, 'ninja' + build.linux(cmd: 'ninja', script: this) } stage('Test (Mac)') { - build.linux 'build', 'tests ctest', 'ninja' + build.linux(cmd: 'ninja', script: this, target: 'tests ctest') } stage('Data Explorer (Mac)') { - configure.linux 'build', "${defaultCMakeOptions} " + - '-DOGS_BUILD_GUI=ON -DOGS_BUILD_UTILS=ON -DOGS_BUILD_TESTS=OFF ' + - '-DOGS_BUILD_METIS=ON', - 'Ninja', '', true - build.linux 'build', null, 'ninja' + configure.linux( + cmakeOptions: defaultCMakeOptions + guiCMakeOptions, + generator: 'Ninja', + keepDir: true, + script: this + ) + build.linux(cmd: 'ninja', script: this) } stage('Archive (Mac)') { diff --git a/scripts/jenkins/msvc.groovy b/scripts/jenkins/msvc.groovy index 5e9d9c45ee48bab328cb0d616a4e8560fe732131..29f0b58ed999a99b764c1bd035fb55c2a0e91a08 100644 --- a/scripts/jenkins/msvc.groovy +++ b/scripts/jenkins/msvc.groovy @@ -1,6 +1,5 @@ def defaultCMakeOptions = - '-DCMAKE_BUILD_TYPE=Release ' + '-DOGS_LIB_BOOST=System ' + '-DOGS_LIB_VTK=System ' + '-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON' @@ -19,25 +18,24 @@ def helper = new ogs.helper() withEnv(helper.getEnv(this)) { stage('Configure (Win)') { - configure.win 'build', "${defaultCMakeOptions}", 'Ninja', - '-u -s build_type=Release -s compiler="Visual Studio" ' + - '-s compiler.version=12 -s arch=x86_64' + configure.win(cmakeOptions: defaultCMakeOptions, script: this) } stage('CLI (Win)') { - build.win this, 'build' + build.win(script: this) } stage('Test (Win)') { - build.win this, 'build', 'tests' - build.win this, 'build', 'ctest' + build.win(script: this, target: 'tests') + build.win(script: this, target: 'ctest') } stage('Data Explorer (Win)') { - configure.win 'build', "${defaultCMakeOptions} ${guiCMakeOptions}", - 'Ninja', '-u -s build_type=Release -s compiler="Visual Studio" ' + - '-s compiler.version=12 -s arch=x86_64', true - build.win this, 'build' + configure.win( + cmakeOptions: defaultCMakeOptions + ' ' + guiCMakeOptions, keepDir: true, + script: this + ) + build.win(script: this) } } diff --git a/scripts/jenkins/msvc32.groovy b/scripts/jenkins/msvc32.groovy index 633abcfc04704e8b2e2a259805fa16a17289b16f..ff26322ce9db2ff0a9ba4a8cd9dc9664487dd4ad 100644 --- a/scripts/jenkins/msvc32.groovy +++ b/scripts/jenkins/msvc32.groovy @@ -3,7 +3,13 @@ def defaultCMakeOptions = '-DOGS_32_BIT=ON ' + '-DOGS_LIB_BOOST=System ' + '-DOGS_LIB_VTK=System ' + - '-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON' + '-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON ' + +def guiCMakeOptions = + '-DOGS_BUILD_GUI=ON ' + + '-DOGS_BUILD_UTILS=ON ' + + '-DOGS_BUILD_TESTS=OFF ' + + '-DOGS_BUILD_METIS=ON ' def configure = new ogs.configure() def build = new ogs.build() @@ -13,16 +19,16 @@ def helper = new ogs.helper() withEnv(helper.getEnv(this, 'x32')) { stage('Data Explorer 32-bit (Win)') { - configure.win 'build-32', "${defaultCMakeOptions} " + - '-DOGS_BUILD_GUI=ON -DOGS_BUILD_UTILS=ON -DOGS_BUILD_TESTS=OFF ' + - '-DOGS_BUILD_METIS=ON', - 'Ninja', '-u -s build_type=Release -s compiler="Visual ' + - 'Studio" -s compiler.version=12 -s arch=x86' - build.win this, 'build-32' + configure.win( + arch: 'x86', + cmakeOptions: defaultCMakeOptions + guiCMakeOptions, + script: this + ) + build.win(script: this) } } stage('Post 32-bit (Win)') { - archiveArtifacts 'build-32/*.zip' - post.cleanup('build-32') + archiveArtifacts 'build/*.zip' + post.cleanup('build') }