File tree Expand file tree Collapse file tree 4 files changed +50
-12
lines changed Expand file tree Collapse file tree 4 files changed +50
-12
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,18 @@ jobs:
48
48
- name : Checkout
49
49
uses : actions/checkout@v4.1.1
50
50
51
- - name : Install Dependencies
52
- run : |
53
- sudo apt-get install -y doxygen
54
- pip3 install -r docs/requirements.txt
51
+ - name : Install Doxygen
52
+ run : sudo apt-get install -y doxygen
53
+
54
+ - name : Configure Project
55
+ uses : threeal/cmake-action@v1.3.0
56
+ with :
57
+ options : BUILD_DOCS=ON
55
58
56
59
- name : Build Documentation
57
- run : sphinx- build -b html docs build/docs -W --keep-going
60
+ run : cmake -- build build --target docs
58
61
59
62
- name : Upload Documentation
60
63
uses : actions/upload-pages-artifact@v3.0.0
61
64
with :
62
- path : build/docs
65
+ path : build/docs/html
Original file line number Diff line number Diff line change @@ -23,18 +23,21 @@ jobs:
23
23
- name : Checkout
24
24
uses : actions/checkout@v4.1.1
25
25
26
- - name : Install Dependencies
27
- run : |
28
- sudo apt-get install -y doxygen
29
- pip3 install -r docs/requirements.txt
26
+ - name : Install Doxygen
27
+ run : sudo apt-get install -y doxygen
28
+
29
+ - name : Configure Project
30
+ uses : threeal/cmake-action@v1.3.0
31
+ with :
32
+ options : BUILD_DOCS=ON
30
33
31
34
- name : Build Documentation
32
- run : sphinx- build -b html docs docs/ build -W --keep-going
35
+ run : cmake -- build build --target docs
33
36
34
37
- name : Upload Documentation
35
38
uses : actions/upload-pages-artifact@v3.0.0
36
39
with :
37
- path : docs/build
40
+ path : build/ docs/html
38
41
39
42
- name : Deploy Pages
40
43
id : deploy-pages
Original file line number Diff line number Diff line change @@ -82,3 +82,7 @@ if(NOT_SUBPROJECT)
82
82
endif ()
83
83
84
84
add_subdirectory (components )
85
+
86
+ if (NOT_SUBPROJECT AND BUILD_DOCS )
87
+ add_subdirectory (docs )
88
+ endif ()
Original file line number Diff line number Diff line change
1
+ find_package (Python REQUIRED )
2
+
3
+ message (STATUS "Installing Python dependencies" )
4
+ execute_process (
5
+ COMMAND ${Python_EXECUTABLE} -m pip install -r ${CMAKE_CURRENT_SOURCE_DIR} /requirements.txt
6
+ RESULT_VARIABLE RES
7
+ ERROR_VARIABLE ERR
8
+ OUTPUT_QUIET
9
+ )
10
+ if (NOT RES EQUAL 0 )
11
+ message (FATAL_ERROR "Failed to install Python dependencies:\n ${ERR} " )
12
+ endif ()
13
+
14
+ get_target_property (errors_docs_BINARY_DIR errors_docs BINARY_DIR )
15
+ get_target_property (errors_format_docs_BINARY_DIR errors_format_docs BINARY_DIR )
16
+
17
+ add_custom_command (
18
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR} /html/index.html
19
+ COMMAND ${Python_EXECUTABLE} -m sphinx -b html ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} /html -W --keep-going
20
+ DEPENDS
21
+ ${CMAKE_CURRENT_SOURCE_DIR} /conf.py
22
+ ${CMAKE_CURRENT_SOURCE_DIR} /index.rst
23
+ ${errors_docs_BINARY_DIR} /errors_docs.stamp
24
+ ${errors_format_docs_BINARY_DIR} /errors_format_docs.stamp
25
+ )
26
+
27
+ add_custom_target (docs ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /html/index.html )
28
+ add_dependencies (docs errors_docs errors_format_docs )
You can’t perform that action at this time.
0 commit comments