🚧 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:
|
ci_test_documentation:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target: [ci_test_examples, ci_test_api_documentation]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- 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
|
# test documentation
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
add_custom_target(ci_test_documentation
|
add_custom_target(ci_test_examples
|
||||||
COMMAND make CXX="${GCC_TOOL}" check_output_portable -j8
|
COMMAND make CXX="${GCC_TOOL}" check_output_portable -j8
|
||||||
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs
|
||||||
COMMENT "Check that all examples compile and create the desired output"
|
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.
|
# Clean up all generated files.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
import glob
|
import glob
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
warnings = 0
|
warnings = 0
|
||||||
|
|
||||||
@ -173,3 +174,6 @@ if __name__ == '__main__':
|
|||||||
check_structure()
|
check_structure()
|
||||||
check_examples()
|
check_examples()
|
||||||
print(120 * '-')
|
print(120 * '-')
|
||||||
|
|
||||||
|
if warnings > 0:
|
||||||
|
sys.exit(1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user