🚧 add CI check for the API documentation
This commit is contained in:
parent
b22a991802
commit
31496f4b69
5
.github/workflows/ubuntu.yml
vendored
5
.github/workflows/ubuntu.yml
vendored
@ -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 }}
|
||||
|
||||
@ -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.
|
||||
###############################################################################
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user