mirror of
https://github.com/triqs/dft_tools
synced 2024-12-22 12:23:41 +01:00
[jenkins] add sanitize platform build
This commit is contained in:
parent
89e1163f21
commit
8cc1949be0
@ -9,8 +9,8 @@ COPY --chown=build . $SRC/$APPNAME
|
||||
WORKDIR $BUILD/$APPNAME
|
||||
RUN chown build .
|
||||
USER build
|
||||
ARG BUILD_DOC=0
|
||||
ARG BUILD_ID
|
||||
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} -DBuild_Deps=Always && make -j2 || make -j1 VERBOSE=1
|
||||
ARG CMAKE_ARGS
|
||||
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Deps=Always $CMAKE_ARGS && make -j2 || make -j1 VERBOSE=1
|
||||
USER root
|
||||
RUN make install
|
||||
|
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -25,7 +25,7 @@ def platforms = [:]
|
||||
|
||||
/****************** linux builds (in docker) */
|
||||
/* Each platform must have a cooresponding Dockerfile.PLATFORM in triqs/packaging */
|
||||
def dockerPlatforms = ["ubuntu-clang", "ubuntu-gcc"]
|
||||
def dockerPlatforms = ["ubuntu-clang", "ubuntu-gcc", "sanitize"]
|
||||
/* .each is currently broken in jenkins */
|
||||
for (int i = 0; i < dockerPlatforms.size(); i++) {
|
||||
def platform = dockerPlatforms[i]
|
||||
@ -38,7 +38,12 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
|
||||
mv -f Dockerfile.jenkins Dockerfile
|
||||
"""
|
||||
/* build and tag */
|
||||
def img = docker.build("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_DOC=${platform==documentationPlatform} --build-arg BUILD_ID=${env.BUILD_TAG} .")
|
||||
def args = ''
|
||||
if (platform == documentationPlatform)
|
||||
args = '-DBuild_Documentation=1'
|
||||
else if (platform == "sanitize")
|
||||
args = '-DASAN=ON -DUBSAN=ON'
|
||||
def img = docker.build("flatironinstitute/${dockerName}:${env.BRANCH_NAME}-${env.STAGE_NAME}", "--build-arg APPNAME=${projectName} --build-arg BUILD_ID=${env.BUILD_TAG} --build-arg CMAKE_ARGS='${args}' .")
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
img.inside() {
|
||||
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
|
||||
|
Loading…
Reference in New Issue
Block a user