👷 add test for documentation

This commit is contained in:
Niels Lohmann 2022-07-28 22:43:54 +02:00
parent ac66648111
commit d84cbe3152
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 22 additions and 0 deletions

View File

@ -147,3 +147,12 @@ jobs:
run: python -m pip install reuse
- name: REUSE lint
run: reuse lint
ci_test_documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: cmake
run: cmake -S . -B build -DJSON_CI=On
- name: build
run: cmake --build build --target ci_test_documentation

View File

@ -934,6 +934,16 @@ add_custom_target(ci_icpc
COMMENT "Compile and test with ICPC"
)
###############################################################################
# test documentation
###############################################################################
add_custom_target(ci_test_documentation
COMMAND make check_output_portable -j8
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/docs
COMMENT "Check that all examples compile and create the desired output"
)
###############################################################################
# Clean up all generated files.
###############################################################################

View File

@ -28,6 +28,9 @@ create_output: $(EXAMPLES:.cpp=.output)
# check output of all stand-alone example files
check_output: $(EXAMPLES:.cpp=.test)
# check output of all stand-alone example files (exclude meta which is dependent on the current compiler)
check_output_portable: $(filter-out meta.test,$(EXAMPLES:.cpp=.test))
clean:
rm -fr $(EXAMPLES:.cpp=)
$(MAKE) clean -C docset