From bc141c1a9a8c47f2c1700dc147291897ec53913f Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Tue, 30 Mar 2021 21:47:27 +0200 Subject: [PATCH] [Doxygen] Implemented full text search. Fixes #3118. --- scripts/ci/jobs/build-docs.yml | 6 ++++-- scripts/cmake/DocumentationSetup.cmake | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/ci/jobs/build-docs.yml b/scripts/ci/jobs/build-docs.yml index 57b46843828..4807bcdac40 100644 --- a/scripts/ci/jobs/build-docs.yml +++ b/scripts/ci/jobs/build-docs.yml @@ -1,6 +1,6 @@ build docs: stage: build - tags: [shell, envinf] + tags: [envinf2-shell] dependencies: [meta] rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH @@ -20,7 +20,7 @@ build docs: - mkdir -p build - cd build script: - - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_USE_CONAN=OFF -DOGS_BUILD_PROCESSES=GroundwaterFlow + - cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DOGS_USE_CONAN=OFF -DOGS_USE_POETRY=OFF -DOGS_BUILD_PROCESSES=SteadyStateDiffusion - cmake --build . --target doc > >(tee make-docs.output) - cat DoxygenWarnings.log|grep -v 'too many nodes' - echo "doxygen_warnings `cat DoxygenWarnings.log|grep warning:|grep -v 'too many nodes'|wc -l|xargs`" > metrics.txt @@ -33,6 +33,8 @@ build docs: netlify link --name ogs-doxygen-${CI_COMMIT_BRANCH//./-} netlify deploy --prod --dir=docs fi + sshpass -p $DOXYSEARCH_PW rsync -az doxysearch.db webdev@doxysearch.opengeosys.org:/var/www/doxysearch.opengeosys.org/$CI_COMMIT_BRANCH/ + sshpass -p $DOXYSEARCH_PW ssh webdev@doxysearch.opengeosys.org doxyindexer -o /var/www/doxysearch.opengeosys.org/$CI_COMMIT_BRANCH /var/www/doxysearch.opengeosys.org/$CI_COMMIT_BRANCH/searchdata.xml fi artifacts: expose_as: 'Doxygen' diff --git a/scripts/cmake/DocumentationSetup.cmake b/scripts/cmake/DocumentationSetup.cmake index afacf620f70..4c49a0a131d 100644 --- a/scripts/cmake/DocumentationSetup.cmake +++ b/scripts/cmake/DocumentationSetup.cmake @@ -75,6 +75,14 @@ set(DOXYGEN_ALIASES "ogs_missing_documentation = \\xrefitem ogs_missing_documentation \\\"Missing Documentation\\\" \\\"OGS Input File Parameters&mdash\;List of incomplete documentation pages\\\" Documentation missing/incomplete" ) set(DOXYGEN_CREATE_SUBDIRS YES) +if($ENV{CI_COMMIT_BRANCH} MATCHES "master|^v[0-9]\.[0-9]\.[0-9]") + set(DOXYGEN_SERVER_BASED_SEARCH YES) + set(DOXYGEN_EXTERNAL_SEARCH YES) + set(DOXYGEN_SEARCHENGINE_URL + "http://doxysearch.opengeosys.org/$ENV{CI_COMMIT_BRANCH}/doxysearch.cgi" + ) + message(STATUS "Doxygen search server: ${DOXYGEN_SEARCHENGINE_URL}") +endif() configure_file( ${PROJECT_SOURCE_DIR}/Documentation/mainpage.dox.in ${PROJECT_BINARY_DIR}/DocAux/dox/mainpage.dox -- GitLab