🚧 add CI check for the API documentation

This commit is contained in:
Niels Lohmann 2022-08-05 14:15:13 +02:00
parent b22a991802
commit 31496f4b69
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 15 additions and 2 deletions

View File

@ -151,9 +151,12 @@ jobs:
ci_test_documentation:
runs-on: ubuntu-latest
strategy:
matrix:
target: [ci_test_examples, ci_test_api_documentation]
steps:
- uses: actions/checkout@v3
- name: Run CMake
run: cmake -S . -B build -DJSON_CI=On
- name: Build
run: cmake --build build --target ci_test_documentation
run: cmake --build build --target ${{ matrix.target }}

View File

@ -953,12 +953,18 @@ add_custom_target(ci_icpc
# test documentation
###############################################################################
add_custom_target(ci_test_documentation
add_custom_target(ci_test_examples
COMMAND make CXX="${GCC_TOOL}" check_output_portable -j8
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs
COMMENT "Check that all examples compile and create the desired output"
)
add_custom_target(ci_test_api_documentation
COMMAND ${Python3_EXECUTABLE} scripts/check_structure.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs/mkdocs
COMMENT "Lint the API documentation"
)
###############################################################################
# Clean up all generated files.
###############################################################################

View File

@ -3,6 +3,7 @@
import glob
import os.path
import re
import sys
warnings = 0
@ -173,3 +174,6 @@ if __name__ == '__main__':
check_structure()
check_examples()
print(120 * '-')
if warnings > 0:
sys.exit(1)