3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-29 00:15:00 +02:00

[jenkins] run tests separately and mark failures unstable

This commit is contained in:
Dylan Simon 2020-05-19 19:19:19 -04:00
parent d3fc0d26bf
commit 06c3c821d3
2 changed files with 8 additions and 3 deletions

View File

@ -10,6 +10,6 @@ WORKDIR $BUILD/$APPNAME
RUN chown build .
USER build
ARG BUILD_DOC=0
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} && make -j2 && make test CTEST_OUTPUT_ON_FAILURE=1
RUN cmake $SRC/$APPNAME -DTRIQS_ROOT=${INSTALL} -DBuild_Documentation=${BUILD_DOC} && make -j2
USER root
RUN make install

9
Jenkinsfile vendored
View File

@ -39,6 +39,11 @@ for (int i = 0; i < dockerPlatforms.size(); i++) {
"""
/* 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} .")
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
img.inside() {
sh "make -C \$BUILD/${projectName} test CTEST_OUTPUT_ON_FAILURE=1"
}
}
if (!keepInstall) {
sh "docker rmi --no-prune ${img.imageName()}"
}
@ -76,12 +81,12 @@ for (int i = 0; i < osxPlatforms.size(); i++) {
sh "pip3 install -r $srcDir/requirements.txt"
sh "cmake $srcDir -DCMAKE_INSTALL_PREFIX=$installDir -DTRIQS_ROOT=$triqsDir"
sh "make -j2"
try {
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') { try {
sh "make test CTEST_OUTPUT_ON_FAILURE=1"
} catch (exc) {
archiveArtifacts(artifacts: 'Testing/Temporary/LastTest.log')
throw exc
}
} }
sh "make install"
} }
} }