3
0
mirror of https://github.com/triqs/dft_tools synced 2024-07-17 00:20:39 +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 . RUN chown build .
USER build USER build
ARG BUILD_DOC=0 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 USER root
RUN make install RUN make install

9
Jenkinsfile vendored
View File

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