diff --git a/.github/workflows/asciidoctor-ghpages.yml b/.github/workflows/asciidoctor-ghpages.yml index bd4b2e6..6d920eb 100644 --- a/.github/workflows/asciidoctor-ghpages.yml +++ b/.github/workflows/asciidoctor-ghpages.yml @@ -40,7 +40,7 @@ jobs: node-version: 20 - name: Install Mermaid run: | - sudo npm install -g @mermaid-js/mermaid-cli@11.2.0 + sudo npm install -g @mermaid-js/mermaid-cli@11.2.1 - name: Install asciidoctor run: | sudo apt update diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 715fcbc..f05349c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: - name: Install Mermaid run: | - sudo npm install -g @mermaid-js/mermaid-cli@11.2.0 + sudo npm install -g @mermaid-js/mermaid-cli@11.2.1 - name: Install asciidoctor run: | diff --git a/cmake/main.cmake b/cmake/main.cmake index 3ef3f82..5b4a738 100644 --- a/cmake/main.cmake +++ b/cmake/main.cmake @@ -28,6 +28,10 @@ option(INFRA_PROVIDE_PRESETS "Provide cmake presets and toolchains" ON) option(INFRA_PROVIDE_MULL "Provide mull.yml file" ON) option(INFRA_PROVIDE_PYTEST_REQS "Provide pip requirements.txt for python tests" ON) +option( + INFRA_PROVIDE_PUPPETEER_CONFIG + "Provide puppeteer_config.json for generating mermaid diagrams in documentation" + ON) option(INFRA_PROVIDE_GITIGNORE "Add provided things to .gitignore" ON) option(INFRA_USE_SYMLINKS "Use symlinks to provide common files" ON) @@ -38,6 +42,8 @@ if(${PROJECT_SOURCE_DIR}/cmake STREQUAL CMAKE_CURRENT_LIST_DIR) set(INFRA_PROVIDE_CMAKE_FORMAT OFF) set(INFRA_PROVIDE_PRESETS OFF) set(INFRA_PROVIDE_MULL OFF) + set(INFRA_PROVIDE_PYTEST_REQS OFF) + set(INFRA_PROVIDE_PUPPETEER_CONFIG OFF) set(INFRA_PROVIDE_GITIGNORE OFF) endif() diff --git a/cmake/setup.cmake b/cmake/setup.cmake index df72fec..a8b8134 100644 --- a/cmake/setup.cmake +++ b/cmake/setup.cmake @@ -46,6 +46,11 @@ function(make_gitignore) list(APPEND GITIGNORE_CONTENTS "requirements.txt") endif() endif() + if(INFRA_PROVIDE_PUPPETEER_CONFIG) + if(NOT EXISTS "${CMAKE_SOURCE_DIR}/docs/puppeteer_config.json") + list(APPEND GITIGNORE_CONTENTS "docs/puppeteer_config.json") + endif() + endif() endif() string(REPLACE ";" "\n" GITIGNORE_CONTENTS "${GITIGNORE_CONTENTS}") @@ -61,6 +66,10 @@ function(make_gitignore) endfunction() function(put_in_project_dir FILENAME) + get_filename_component(DIRNAME ${FILENAME} DIRECTORY) + execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory + "${CMAKE_SOURCE_DIR}/${DIRNAME}") + if(INFRA_USE_SYMLINKS) set(put_command "create_symlink") else() @@ -120,6 +129,9 @@ if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) if(INFRA_PROVIDE_PYTEST_REQS) put_in_project_dir("requirements.txt") endif() + if(INFRA_PROVIDE_PUPPETEER_CONFIG) + put_in_project_dir("docs/puppeteer_config.json") + endif() if(INFRA_PROVIDE_GITHUB_WORKFLOWS) execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory diff --git a/docs/index.adoc b/docs/index.adoc index bf3c6a9..7b77645 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -5,6 +5,7 @@ :rouge-style: base16.solarized :source-language: c++ :toc: left +:mermaid-puppeteer-config: puppeteer_config.json include::intro.adoc[] include::options.adoc[] diff --git a/docs/puppeteer_config.json b/docs/puppeteer_config.json new file mode 100644 index 0000000..3201af7 --- /dev/null +++ b/docs/puppeteer_config.json @@ -0,0 +1,3 @@ +{ + "args": ["--no-sandbox"] +} diff --git a/test/application/clean.sh b/test/application/clean.sh index de82536..9c583d7 100755 --- a/test/application/clean.sh +++ b/test/application/clean.sh @@ -9,6 +9,8 @@ rm -f mull.yml rm -f .gitignore rm -f CMakePresets.json rm -f toolchains +rm -f requirements.txt +rm -rf docs rm -rf build rm -rf .github diff --git a/test/library/clean.sh b/test/library/clean.sh index de82536..da8b214 100755 --- a/test/library/clean.sh +++ b/test/library/clean.sh @@ -9,6 +9,8 @@ rm -f mull.yml rm -f .gitignore rm -f CMakePresets.json rm -f toolchains +rm -f requirements.txt +rm -f docs/puppeteer_config.json rm -rf build rm -rf .github diff --git a/test/verify_links.sh b/test/verify_links.sh index 51d1347..50d12b1 100755 --- a/test/verify_links.sh +++ b/test/verify_links.sh @@ -4,7 +4,7 @@ set -euo pipefail echo "Verifying links in "`pwd` -links=( .clang-format .clang-tidy .cmake-format.yaml CMakePresets.json toolchains ) +links=( .clang-format .clang-tidy .cmake-format.yaml CMakePresets.json docs/puppeteer_config.json mull.yml requirements.txt toolchains ) for l in "${links[@]}" do if ! [[ -L "application/${l}" ]]; then