Skip to content

Commit 0c3d9cb

Browse files
authored
feat(docs): Doxygen automatic code documentation (endless-sky#10134)
1 parent 603380a commit 0c3d9cb

File tree

5 files changed

+139
-0
lines changed

5 files changed

+139
-0
lines changed

.github/path-filters.yml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ unit_tests:
1414
integration_tests:
1515
- 'tests/integration/config/plugins/integration-tests/**'
1616

17+
doxygen_config:
18+
- 'Doxyfile'
19+
1720
codespell:
1821
- .codespell.exclude
1922
- .codespell.words.exclude

.github/workflows/ci.yml

+21
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ on:
1414
- '.github/workflows/**'
1515
- 'CMakeLists.txt'
1616
- 'CMakePresets.json'
17+
- Doxyfile
1718
- keys.txt
1819
pull_request:
1920
# Run for any push to any pull request, if it modifies source code or game text.
@@ -25,6 +26,7 @@ on:
2526
- '.github/workflows/**'
2627
- 'CMakeLists.txt'
2728
- 'CMakePresets.json'
29+
- Doxyfile
2830
- keys.txt
2931

3032

@@ -193,6 +195,25 @@ jobs:
193195
run: ctest --preset macos-ci-benchmark
194196

195197

198+
build_documentation_doxygen:
199+
name: Documentation Doxygen
200+
needs: changed
201+
if: ${{ needs.changed.outputs.game_code == 'true' || needs.changed.outputs.unit_tests == 'true' || needs.changed.outputs.doxygen_config == 'true' || needs.changed.outputs.ci_config == 'true'}}
202+
runs-on: ubuntu-24.04
203+
env:
204+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
205+
steps:
206+
- uses: actions/checkout@v4
207+
with:
208+
show-progress: false
209+
- name: Install development dependencies
210+
run: |
211+
sudo apt-get update
212+
sudo apt-get install -y --no-install-recommends doxygen graphviz clang
213+
- name: Run Doxygen
214+
run: doxygen
215+
216+
196217
test-parse:
197218
needs: [changed, build_windows]
198219
name: Data Files

.github/workflows/compute-changes.yml

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
value: ${{ jobs.changed.outputs.unit_tests }}
1212
integration_tests:
1313
value: ${{ jobs.changed.outputs.integration_tests }}
14+
doxygen_config:
15+
value: ${{ jobs.changed.outputs.doxygen_config }}
1416
codespell:
1517
value: ${{ jobs.changed.outputs.codespell }}
1618
editorconfig_files:

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ scons-local*
3131
# Test Reports
3232
test-report.xml
3333

34+
# Generated documentation
35+
docs/api/
36+
3437
# User-installed plugins
3538
/plugins/
3639

Doxyfile

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Doxyfile 1.9.4
2+
3+
# This file describes the settings to be used by the documentation system
4+
# doxygen (www.doxygen.org) for a project.
5+
#
6+
# All text after a double hash (##) is considered a comment and is placed in
7+
# front of the TAG it is preceding.
8+
#
9+
# All text after a single hash (#) is considered a comment and will be ignored.
10+
# The format is:
11+
# TAG = value [value, ...]
12+
# For lists, items can also be appended using:
13+
# TAG += value [value, ...]
14+
# Values that contain spaces should be placed between quotes (\" \").
15+
#
16+
# Note:
17+
#
18+
# Use doxygen to compare the used configuration file with the template
19+
# configuration file:
20+
# doxygen -x [configFile]
21+
# Use doxygen to compare the used configuration file with the template
22+
# configuration file without replacing the environment variables:
23+
# doxygen -x_noenv [configFile]
24+
25+
DOXYFILE_ENCODING = UTF-8
26+
PROJECT_NAME = "Endless Sky"
27+
PROJECT_NUMBER =
28+
PROJECT_BRIEF = "This is an auto generated documentation for the source code of endless-sky."
29+
PROJECT_LOGO = icons/icon_48x48.png
30+
OUTPUT_DIRECTORY = ./docs/api
31+
32+
CREATE_SUBDIRS = YES
33+
34+
INPUT = ./source
35+
RECURSIVE = YES
36+
EXCLUDE =
37+
EXCLUDE_SYMLINKS = YES
38+
39+
EXTRACT_ALL = YES
40+
EXTRACT_PRIVATE = YES
41+
EXTRACT_PRIV_VIRTUAL = YES
42+
EXTRACT_STATIC = YES
43+
EXTRACT_LOCAL_CLASSES = YES
44+
EXTRACT_ANON_NSPACES = YES
45+
46+
WARN_NO_PARAMDOC = YES
47+
WARN_AS_ERROR = NO
48+
WARN_LOGFILE =
49+
50+
CLANG_ASSISTED_PARSING = YES
51+
CLANG_ADD_INC_PATHS = YES
52+
CLANG_OPTIONS = -std=c++20
53+
CLANG_DATABASE_PATH =
54+
55+
GENERATE_LATEX = NO
56+
GENERATE_HTML = YES
57+
HTML_OUTPUT = html
58+
HTML_FILE_EXTENSION = .html
59+
HTML_HEADER =
60+
HTML_FOOTER =
61+
HTML_STYLESHEET =
62+
HTML_EXTRA_STYLESHEET =
63+
HTML_EXTRA_FILES =
64+
HTML_DYNAMIC_MENUS = YES
65+
HTML_DYNAMIC_SECTIONS = NO
66+
HTML_INDEX_NUM_ENTRIES = 100
67+
68+
GENERATE_TREEVIEW = NO
69+
FULL_SIDEBAR = NO
70+
TREEVIEW_WIDTH = 250
71+
72+
HTML_FORMULA_FORMAT = svg
73+
FORMULA_FONTSIZE = 10
74+
USE_MATHJAX = NO
75+
MATHJAX_VERSION = MathJax_2
76+
MATHJAX_FORMAT = HTML-CSS
77+
MATHJAX_RELPATH =
78+
MATHJAX_EXTENSIONS =
79+
MATHJAX_CODEFILE =
80+
81+
SEARCH_INCLUDES = YES
82+
INCLUDE_PATH =
83+
INCLUDE_FILE_PATTERNS =
84+
PREDEFINED =
85+
86+
HAVE_DOT = YES
87+
DOT_NUM_THREADS = 0
88+
DOT_FONTPATH =
89+
90+
CLASS_GRAPH = YES
91+
COLLABORATION_GRAPH = YES
92+
GROUP_GRAPHS = YES
93+
UML_LOOK = YES
94+
UML_LIMIT_NUM_FIELDS = 10
95+
DOT_UML_DETAILS = NO
96+
DOT_WRAP_THRESHOLD = 17
97+
INCLUDE_GRAPH = YES
98+
INCLUDED_BY_GRAPH = YES
99+
CALL_GRAPH = YES
100+
CALLER_GRAPH = YES
101+
GRAPHICAL_HIERARCHY = YES
102+
DIRECTORY_GRAPH = YES
103+
DIR_GRAPH_MAX_DEPTH = 1
104+
105+
DOT_IMAGE_FORMAT = svg
106+
INTERACTIVE_SVG = YES
107+
DOT_GRAPH_MAX_NODES = 50
108+
MAX_DOT_GRAPH_DEPTH = 0
109+
DOT_MULTI_TARGETS = NO
110+
DOT_CLEANUP = YES

0 commit comments

Comments
 (0)