Skip to content

Commit

Permalink
Initiating some documentation using Doxygen & Sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas-C committed Jan 15, 2025
1 parent 5bef419 commit c8cc3ac
Show file tree
Hide file tree
Showing 11 changed files with 3,081 additions and 1 deletion.
28 changes: 27 additions & 1 deletion .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
formatting:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install clang-format
env:
Expand Down Expand Up @@ -135,3 +135,29 @@ jobs:
- name: Run Tests Valgrind
if: matrix.config.mode == 'Debug' && matrix.config.cc == 'gcc-12'
run: valgrind --error-exitcode=1 --show-reachable=yes --leak-check=full ./build/utl-test

doc:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Set up Python 3.13 🔧
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: Install doxygen 🔧
uses: ssciwr/doxygen-install@v1
with:
version: "1.13.2"
- name: Install Python dependencies ⚙️
run: pip install -r docs/requirements.txt
- name: Generate HTML documentation 🏗️
run: |
mkdir -p public/
- name: Deploy documentation 🚀
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public/
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
*.sublime-*
/.idea
/deps
/docs/html
/docs/xml
/.vscode
_build/
.clang-tidy
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ target_link_libraries(utl-test utl gtest gmock gtest_main)
if (NOT MSVC)
target_compile_options(utl-test PRIVATE -Wall -Wextra -Werror)
endif()

add_subdirectory ("docs")
17 changes: 17 additions & 0 deletions docs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
find_package(Doxygen REQUIRED)

# Find all the public headers
get_target_property(UTL_PUBLIC_HEADER_DIR utl INTERFACE_INCLUDE_DIRECTORIES)
file(GLOB_RECURSE UTL_PUBLIC_HEADERS ${UTL_PUBLIC_HEADER_DIR}/*.h)

#This will be the main output of our command
set(DOXYGEN_INDEX_FILE ${CMAKE_CURRENT_SOURCE_DIR}/html/index.html)

add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE}
DEPENDS ${UTL_PUBLIC_HEADERS}
COMMAND ${DOXYGEN_EXECUTABLE} Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
MAIN_DEPENDENCY Doxyfile
COMMENT "Generating docs")

add_custom_target(Doxygen ALL DEPENDS ${DOXYGEN_INDEX_FILE})
Loading

0 comments on commit c8cc3ac

Please sign in to comment.