diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2bfb7ccdb27efdef9f9c2e248f9d0ba2ecc96541..287f62ebd56b4a371ff0db2f4899993616d4e6f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -114,6 +114,7 @@ full-dune-master-gcc-cpp-20: CXX_MAX_STANDARD: "20" DUMUX_ENABLE_CPPCHECK: "true" DUMUX_ENABLE_DOXYGEN_BUILD: "true" + DUMUX_CHECK_EXAMPLE_DOCS: "true" ################################## # additional scheduled pipelines # diff --git a/.gitlab-ci/default.yml b/.gitlab-ci/default.yml index 92112979e1f406e34c116ae684b519c1dff1c279..3e8fcf3ecb11005f39230b9a60fea4d842b54524 100644 --- a/.gitlab-ci/default.yml +++ b/.gitlab-ci/default.yml @@ -101,6 +101,24 @@ cppcheck: rules: - if: $DUMUX_ENABLE_CPPCHECK == "true" + +check-example-docs: + stage: linting + rules: + - if: $DUMUX_CHECK_EXAMPLE_DOCS == "true" + when: always + script: + - cd examples + - python3 generate_example_docs.py + - git diff -G. > example_diff.txt # -G. shows textual diff, ignoring file mode changes + - | + if [ -s example_diff.txt ]; then + cat example_diff.txt + echo "Example documentation is not up-to-date. Please rerun 'generate_example_docs.py'" + exit 1 + fi + + select tests: stage: select script: diff --git a/CHANGELOG.md b/CHANGELOG.md index af3c476e9f1969d3555800ec8b0988205e9f82b6..7f3fb2058cedd39eb754971329f8c4e74a848c37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ Differences Between DuMu<sup>x</sup> 3.7 and DuMu<sup>x</sup> 3.6 - __Testing/CI__: One of the CI pipelines now includes a build of the `doxygen` documentation. The result of this build can be downloaded from the job artifacts. +- __Testing/CI__: The example documentation is now re-generated in the CI in order to verify that the generated README +files are in sync with the sources from which they are produced. + ### Improvements and Enhancements - __IO/RasterImageWriter__: A tool now exists for writing `.pbm` and `.pgm` image files.