mirror of
https://github.com/triqs/dft_tools
synced 2024-12-23 04:43:42 +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
|
WORKDIR $BUILD/$APPNAME
|
||||||
RUN chown build .
|
RUN chown build .
|
||||||
USER build
|
USER build
|
||||||
ARG BUILD_DOC=0
|
|
||||||
ARG BUILD_ID
|
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
|
USER root
|
||||||
RUN make install
|
RUN make install
|
||||||
|
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@ -25,7 +25,7 @@ def platforms = [:]
|
|||||||
|
|
||||||
/****************** linux builds (in docker) */
|
/****************** linux builds (in docker) */
|
||||||
/* Each platform must have a cooresponding Dockerfile.PLATFORM in triqs/packaging */
|
/* 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 */
|
/* .each is currently broken in jenkins */
|
||||||
for (int i = 0; i < dockerPlatforms.size(); i++) {
|
for (int i = 0; i < dockerPlatforms.size(); i++) {
|
||||||
def platform = dockerPlatforms[i]
|
def platform = dockerPlatforms[i]
|
||||||
@ -38,7 +38,12 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
|
|||||||
mv -f Dockerfile.jenkins Dockerfile
|
mv -f Dockerfile.jenkins Dockerfile
|
||||||
"""
|
"""
|
||||||
/* build and tag */
|
/* 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') {
|
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||||
img.inside() {
|
img.inside() {
|
||||||
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
|
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
|
||||||
|
Loading…
Reference in New Issue
Block a user