Skip to content

Commit

Permalink
Retry headers check and threading tests in case of failure. (#2982)
Browse files Browse the repository at this point in the history
  • Loading branch information
serban-nicusor-toptal authored Dec 17, 2023
1 parent 56d0432 commit 56cc817
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ pipeline {
}

steps {
unstash 'MathSetup'
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
sh "make -j${PARALLEL} test-headers"
retry(1){
unstash 'MathSetup'
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
sh "make -j${PARALLEL} test-headers"
}
}
post { always { deleteDir() } }
}
Expand Down Expand Up @@ -416,19 +418,21 @@ pipeline {
}
steps {
script {
unstash 'MathSetup'
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
sh "echo STAN_THREADS=true >> make/local"
sh "export STAN_NUM_THREADS=4"
if (isBranch('develop') || isBranch('master')) {
runTests("test/unit")
sh "find . -name *_test.xml | xargs rm"
} else {
runTests("test/unit -f thread")
sh "find . -name *_test.xml | xargs rm"
runTests("test/unit -f map_rect")
sh "find . -name *_test.xml | xargs rm"
runTests("test/unit -f reduce_sum")
retry(1){
unstash 'MathSetup'
sh "echo CXX=${CLANG_CXX} -Werror > make/local"
sh "echo STAN_THREADS=true >> make/local"
sh "export STAN_NUM_THREADS=4"
if (isBranch('develop') || isBranch('master')) {
runTests("test/unit")
sh "find . -name *_test.xml | xargs rm"
} else {
runTests("test/unit -f thread")
sh "find . -name *_test.xml | xargs rm"
runTests("test/unit -f map_rect")
sh "find . -name *_test.xml | xargs rm"
runTests("test/unit -f reduce_sum")
}
}
}
}
Expand Down

0 comments on commit 56cc817

Please sign in to comment.