diff --git a/Jenkinsfile b/Jenkinsfile index 962c7a9e4d9349b01beca6e960aacfe5c43da908..567382e8f690bfb05613d2de222b2243d39b58bc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -321,6 +321,7 @@ pipeline { } steps { script { + def num_threads = env.NUM_THREADS bat 'git submodule sync' bat 'conan remove --locks' // CLI + GUI @@ -332,12 +333,13 @@ pipeline { '-DOGS_BUILD_UTILS=ON ' + '-DOGS_BUILD_SWMM=ON ' } - build { target="tests" } - build { target="ctest" } build { target="package" log="build.log" + cmd_args="-l ${num_threads}" } + build { target="tests" } + build { target="ctest" } } } post { @@ -350,7 +352,7 @@ pipeline { excludeFile('.*\\.conan.*'), excludeFile('.*ThirdParty.*'), excludeFile('.*thread.hpp')], tools: [msBuild(name: 'MSVC', pattern: 'build/build.log')], - unstableTotalAll: 1 + qualityGates: [[threshold: 10, type: 'TOTAL', unstable: true]] } success { archiveArtifacts 'build/*.zip,build/conaninfo.txt' diff --git a/ProcessLib/SmallDeformation/Tests.cmake b/ProcessLib/SmallDeformation/Tests.cmake index 64d857ecb68563f4bec4e0922a76e512035f94b9..7a7433af65ca3dccf0a218598028ed9e5cbe85dc 100644 --- a/ProcessLib/SmallDeformation/Tests.cmake +++ b/ProcessLib/SmallDeformation/Tests.cmake @@ -27,7 +27,7 @@ endif() if (OGS_USE_PYTHON) OgsTest(PROJECTFILE Mechanics/Linear/PythonPiston/piston.prj) - OgsTest(PROJECTFILE Mechanics/Linear/PythonHertzContact/hertz_contact.prj) + OgsTest(PROJECTFILE Mechanics/Linear/PythonHertzContact/hertz_contact.prj RUNTIME 45) endif() if (OGS_USE_MPI) diff --git a/ProcessLib/SmallDeformationNonlocal/Tests.cmake b/ProcessLib/SmallDeformationNonlocal/Tests.cmake index 71a7102a721e4838c55a50106ee94375d8f3e234..38a10f3ec898caf2bd02673ca869bfc01b281333 100644 --- a/ProcessLib/SmallDeformationNonlocal/Tests.cmake +++ b/ProcessLib/SmallDeformationNonlocal/Tests.cmake @@ -9,7 +9,7 @@ if (NOT OGS_USE_MPI) OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/p2/bar.prj") OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/p3/bar.prj") OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/t1/bar.prj" RUNTIME 14) - OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/t2/bar.prj") + OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/bar/t2/bar.prj" RUNTIME 35) OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/coarse/beam.prj") OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/medium/beam.prj" RUNTIME 38) OgsTest(PROJECTFILE "Mechanics/EhlersDamageNonLocal/beam/fine/beam.prj" LARGE) diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake index b6ade3c27ed0be23993f04ea03a049db2923ebdc..339acae0cd3e9f597cf5f8d8b9b66629e87b8311 100644 --- a/scripts/cmake/CompilerSetup.cmake +++ b/scripts/cmake/CompilerSetup.cmake @@ -3,13 +3,18 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -if(MSVC_VERSION LESS 1910 OR APPLE) # < VS 15.0; macOS: https://github.com/sakra/cotire/issues/139 +# < VS 15.0; macOS: https://github.com/sakra/cotire/issues/139 +if(MSVC_VERSION LESS 1910 OR APPLE OR ${CMAKE_CXX_COMPILER} MATCHES "clcache") set(OGS_USE_PCH OFF CACHE INTERNAL "") endif() if(OGS_USE_PCH) include(cotire) # compile time reducer endif() +if(${CMAKE_CXX_COMPILER} MATCHES "clcache" AND CMAKE_BUILD_TYPE STREQUAL "Debug") + message(WARNING "clcache does not cache in Debug config!") +endif() + # Set compiler helper variables if(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang") set(COMPILER_IS_CLANG TRUE CACHE INTERNAL "") diff --git a/scripts/cmake/ConanSetup.cmake b/scripts/cmake/ConanSetup.cmake index e851672d73dbe44ca23069ed2810207401ccabec..ea57ad69c20409471a7d61ce68e6f972e0a511c0 100644 --- a/scripts/cmake/ConanSetup.cmake +++ b/scripts/cmake/ConanSetup.cmake @@ -78,12 +78,6 @@ if(OGS_BUILD_GUI) endif() conan_check(VERSION 1.3.0) -conan_add_remote(NAME ogs INDEX 0 - URL https://ogs.jfrog.io/ogs/api/conan/conan) -conan_add_remote(NAME conan-community INDEX 1 - URL https://api.bintray.com/conan/conan-community/conan) -conan_add_remote(NAME bincrafters INDEX 2 - URL https://api.bintray.com/conan/bincrafters/public-conan) message(STATUS "Third-party libraries:") foreach(LIB ${OGS_LIBS}) @@ -112,6 +106,12 @@ string(TIMESTAMP timestamp "%Y.%m.%d") if("${file_timestamp}" VERSION_LESS ${timestamp} OR IS_CI) file(WRITE ${PROJECT_BINARY_DIR}/conan_install_timestamp.txt "${timestamp}\n") set(CONAN_UPDATE UPDATE) + conan_add_remote(NAME ogs INDEX 0 + URL https://ogs.jfrog.io/ogs/api/conan/conan) + conan_add_remote(NAME conan-community INDEX 1 + URL https://api.bintray.com/conan/conan-community/conan) + conan_add_remote(NAME bincrafters INDEX 2 + URL https://api.bintray.com/conan/bincrafters/public-conan) else() message(STATUS "Conan: Skipping update step.") endif() diff --git a/scripts/cmake/DocumentationSetup.cmake b/scripts/cmake/DocumentationSetup.cmake index 25ae1d1860505e495c6f900dfc5724ccd370e544..777cb52760fbe5ad471c24365b266c40bcf8ba67 100644 --- a/scripts/cmake/DocumentationSetup.cmake +++ b/scripts/cmake/DocumentationSetup.cmake @@ -49,7 +49,7 @@ doxygen_add_docs(doc ${PROJECT_SOURCE_DIR}/ ${PROJECT_BINARY_DIR}/DocAux/dox) -if (BASH_TOOL_PATH AND PYTHON_EXECUTABLE) +if (BASH_TOOL_PATH AND Python_EXECUTABLE) set(doc_use_external_tools TRUE) else() set(doc_use_external_tools FALSE) diff --git a/scripts/doc/append-xml-tags.py b/scripts/doc/append-xml-tags.py index bd7b7f995568cdc1aaf5206c89b47f20e4815078..cfeedec168b6c764161cba31317cbf61c79b5680 100755 --- a/scripts/doc/append-xml-tags.py +++ b/scripts/doc/append-xml-tags.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # This script augments the parameter documentation pages by information # such as if they are required/optional, their data typ and in which diff --git a/scripts/doc/check-project-params.py b/scripts/doc/check-project-params.py index a96a74e90e6df32f19934d89df831e746e6f2173..54c4b397a491c4945ec72239619b683b2359191b 100755 --- a/scripts/doc/check-project-params.py +++ b/scripts/doc/check-project-params.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # This script actually generates the QA page. # For its usage see generate-project-file-doc-qa.sh diff --git a/scripts/doc/linked-xml-file.py b/scripts/doc/linked-xml-file.py index b0ebc07e6ca6c8a28e97bb77de25b46881c21892..af0ebceae664652c1a5a8765f5b727cc76dc69d0 100755 --- a/scripts/doc/linked-xml-file.py +++ b/scripts/doc/linked-xml-file.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # This script traverses the DATADIR (where the ctest input data is) and creates # out of every prj file found a file in a subdirectory of DOCAUXDIR. diff --git a/scripts/doc/normalize-param-cache.py b/scripts/doc/normalize-param-cache.py index fb4f0491208deda9e8eb6ad555e375e5f3ef9a34..d4fdfeec1a76b5c5ec24683e45ef4a567b234790 100755 --- a/scripts/doc/normalize-param-cache.py +++ b/scripts/doc/normalize-param-cache.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # This script takes the output of get-project-params.sh on stdin # and transforms it into a tabular representation for further diff --git a/scripts/doc/print23.py b/scripts/doc/print23.py index cdc46377e26438c347b97e7f949655169c389ec7..e3b74f737fc8cdc62a648af6ddc0b101e89df6a2 100644 --- a/scripts/doc/print23.py +++ b/scripts/doc/print23.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/env python3 # Print statement that behaves the same for python 2 and 3. # E,g, print_(1.0, 2, "5") will always print the string "1.0 2 5".