Skip to content
Snippets Groups Projects
Commit 2e906ccd authored by Lars Bilke's avatar Lars Bilke Committed by GitHub
Browse files

Merge pull request #1424 from bilke/fix-clang-release

Fix mac warnings and run clang job.
parents a24bd629 ca15d6a2
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,12 @@ node('master') { ...@@ -27,7 +27,12 @@ node('master') {
step([$class: 'GitHubCommitStatusSetter']) step([$class: 'GitHubCommitStatusSetter'])
if (helper.isRelease()) { build job: 'OGS-6/Deploy', wait: false } if (currentBuild.result == "SUCCESS") {
if (helper.isOriginMaster()) {
build job: 'OGS-6/clang-sanitizer', wait: false
build job: 'OGS-6/Deploy', wait: false
}
}
} }
properties ([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '25']]]) properties ([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '', artifactNumToKeepStr: '5', daysToKeepStr: '', numToKeepStr: '25']]])
configure = load 'scripts/jenkins/lib/configure.groovy'
build = load 'scripts/jenkins/lib/build.groovy'
post = load 'scripts/jenkins/lib/post.groovy'
node('docker') { node('docker') {
def configure = load 'scripts/jenkins/lib/configure.groovy'
def build = load 'scripts/jenkins/lib/build.groovy'
def post = load 'scripts/jenkins/lib/post.groovy'
def defaultDockerArgs = '-v /home/jenkins/.ccache:/usr/src/.ccache' def defaultDockerArgs = '-v /home/jenkins/.ccache:/usr/src/.ccache'
def defaultCMakeOptions =
'-DOGS_LIB_BOOST=System ' +
'-DOGS_LIB_VTK=System ' +
'-DOGS_ADDRESS_SANITIZER=ON ' +
'-DOGS_UNDEFINED_BEHAVIOR_SANITIZER=ON ' +
'-DOGS_BUILD_UTILS=ON'
stage 'Checkout' stage 'Checkout (Clang)'
dir('ogs') { checkout scm } dir('ogs') { checkout scm }
docker.image('ogs6/clang-base:latest').inside(defaultDockerArgs) { docker.image('ogs6/clang-base:latest').inside(defaultDockerArgs) {
catchError { stage 'Configure (Clang)'
configure.linux 'build', "${defaultCMakeOptions} " + configure.linux 'build', "${defaultCMakeOptions}"
'-DOGS_ADDRESS_SANITIZER=ON -DOGS_UNDEFINED_BEHAVIOR_SANITIZER=ON', try {
'' stage 'Unit tests (Clang)'
build.linux 'build', 'tests', 'UBSAN_OPTIONS=print_stacktrace=1 make -j $(nproc)'
stage 'Unit tests' }
build.linux 'build', 'tests', 'UBSAN_OPTIONS=print_stacktrace=1 make' catch(err) { echo "Clang sanitizer for unit tests failed!" }
stage 'End-to-end tests' try {
build.linux 'build', 'ctest', 'UBSAN_OPTIONS=print_stacktrace=1 make' stage 'End-to-end tests (Clang)'
build.linux 'build', 'ctest', 'UBSAN_OPTIONS=print_stacktrace=1 make -j $(nproc)'
} }
catch(err) { echo "Clang sanitizer for end-to-end tests failed!" }
} }
stage 'Post (Clang)'
post.publishTestReports('build/Testing/**/*.xml','build/Tests/testrunner.xml', post.publishTestReports('build/Testing/**/*.xml','build/Tests/testrunner.xml',
'ogs/scripts/jenkins/clang-log-parser.rules') 'ogs/scripts/jenkins/clang-log-parser.rules')
} }
...@@ -4,6 +4,12 @@ def isRelease () { ...@@ -4,6 +4,12 @@ def isRelease () {
return false; return false;
} }
def isOriginMaster() {
if (env.BRANCH_NAME == 'master' && env.JOB_URL.contains('ufz'))
return true;
return false;
}
def getEnv(arch = 'x64') { def getEnv(arch = 'x64') {
if (env.NODE_NAME == 'visserv3') if (env.NODE_NAME == 'visserv3')
qtdir = "C:\\libs\\qt\\4.8\\msvc2013-${arch}" qtdir = "C:\\libs\\qt\\4.8\\msvc2013-${arch}"
......
...@@ -5,7 +5,7 @@ node('mac && conan') { ...@@ -5,7 +5,7 @@ node('mac && conan') {
'-DOGS_LIB_BOOST=System' + '-DOGS_LIB_BOOST=System' +
'-DOGS_LIB_VTK=System ' + '-DOGS_LIB_VTK=System ' +
'-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON ' + '-DOGS_DOWNLOAD_ADDITIONAL_CONTENT=ON ' +
'-DCMAKE_OSX_DEPLOYMENT_TARGET="10.10"' '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.11"'
stage 'Checkout (Mac)' stage 'Checkout (Mac)'
dir('ogs') { checkout scm } dir('ogs') { checkout scm }
......
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