diff --git a/Jenkinsfile b/Jenkinsfile index ec169ed7759110a4ef5adb58c0f78b816aa4a845..02804452f1d04463c65ce6305f7ded3bfa96607e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -13,6 +13,13 @@ builders['gcc'] = { } } +builders['gcc-conan'] = { + node('docker') { + dir('ogs') { checkout scm } + load 'ogs/scripts/jenkins/gcc-conan.groovy' + } +} + builders['gcc-dynamic'] = { node('envinf1') { dir('ogs') { checkout scm } diff --git a/scripts/jenkins/gcc-conan.groovy b/scripts/jenkins/gcc-conan.groovy new file mode 100644 index 0000000000000000000000000000000000000000..a3887dcf8410a78da56ed17fe653428617021898 --- /dev/null +++ b/scripts/jenkins/gcc-conan.groovy @@ -0,0 +1,59 @@ +def defaultDockerArgs = '-v /home/jenkins/.ccache:/usr/src/.ccache ' + + '-v /home/jenkins/conan-data:/root/.conan/data' + +def defaultCMakeOptions = + '-DCMAKE_BUILD_TYPE=Release ' + + '-DOGS_LIB_BOOST=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() +def post = new ogs.post() +def helper = new ogs.helper() + +def image = docker.image('ogs6/gcc-conan') +image.pull() +image.inside(defaultDockerArgs) { + stage('Configure (Linux-Docker)') { + configure.linux( + cmakeOptions: defaultCMakeOptions, + script: this, + useConan: true + ) + } + + stage('CLI (Linux-Docker)') { + build.linux(script: this) + } + + stage('Test (Linux-Docker)') { + build.linux(script: this, target: 'tests ctest') + } + + stage('Data Explorer (Linux-Docker)') { + configure.linux( + cmakeOptions: defaultCMakeOptions + guiCMakeOptions, + keepDir: true, + script: this, + useConan: true + ) + build.linux(script: this) + } +} + +stage('Archive (Linux-Docker)') { + archiveArtifacts 'build/*.tar.gz' +} + +stage('Post (Linux-Docker)') { + post.publishTestReports 'build/Testing/**/*.xml', 'build/Tests/testrunner.xml', + 'ogs/scripts/jenkins/clang-log-parser.rules' + post.cleanup() +} diff --git a/scripts/jenkins/gcc.groovy b/scripts/jenkins/gcc.groovy index 5d5c48d5843d9ef7c0e9bf07005232e9a3f79e85..19e591e89e59827bf0fc4d3a531d662c8782ea12 100644 --- a/scripts/jenkins/gcc.groovy +++ b/scripts/jenkins/gcc.groovy @@ -41,10 +41,6 @@ image.inside(defaultDockerArgs) { } } -stage('Archive (Linux-Docker)') { - archiveArtifacts 'build/*.tar.gz' -} - stage('Post (Linux-Docker)') { post.publishTestReports 'build/Testing/**/*.xml', 'build/Tests/testrunner.xml', 'ogs/scripts/jenkins/clang-log-parser.rules'