Skip to content
Snippets Groups Projects
Commit 6717081e authored by Lars Bilke's avatar Lars Bilke
Browse files

[Jenkins] Use new function signatures with map parameter.

parent c2e41f2d
No related branches found
No related tags found
No related merge requests found
......@@ -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')
}
}
......
......@@ -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)') {
......
......@@ -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') {
......
......@@ -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)
}
}
......
......@@ -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)') {
......
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)
}
}
......
......@@ -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')
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment