Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Generate Doxygen Documentation

on:
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Doxygen
uses: ssciwr/doxygen-install@v1
with:
version: "1.13.2"
- name: Install dependencies
run: ./helper.py -d
- name: Generate Doxygen Documentation
run: ./helper.py --doxygen
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/doxygen/html

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/build/
/cmake-*/

/docs/doxygen/html/

/.idea/*
!/.idea/codeStyles/
!/.idea/runConfigurations/
Expand Down
66 changes: 66 additions & 0 deletions docs/doxygen/Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Doxyfile 1.13.2

#---------#
# Project #
#---------#

PROJECT_NAME = ALFI
PROJECT_NUMBER =
PROJECT_BRIEF = "Advanced Library for Function Interpolation"
PROJECT_LOGO =
PROJECT_ICON =
OUTPUT_DIRECTORY = docs/doxygen
ALWAYS_DETAILED_SEC = YES
BUILTIN_STL_SUPPORT = YES

#-------#
# Build #
#-------#

EXTRACT_ALL = YES
SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO
GENERATE_TODOLIST = NO

#-------------#
# Input files #
#-------------#

INPUT = ALFI
FILE_PATTERNS = *
RECURSIVE = YES
EXAMPLE_PATH = examples
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = YES
USE_MDFILE_AS_MAINPAGE =

#--------#
# Output #
#--------#

GENERATE_HTML = YES
GENERATE_LATEX = NO
HTML_COLORSTYLE = TOGGLE
HTML_DYNAMIC_MENUS = NO
HTML_COPY_CLIPBOARD = NO
HTML_PROJECT_COOKIE = ALFI
SITEMAP_URL = alfi-lib.github.io/ALFI
DISABLE_INDEX = NO
GENERATE_TREEVIEW = YES
ENUM_VALUES_PER_LINE = 1
EXT_LINKS_IN_WINDOW = YES
HTML_FORMULA_FORMAT = svg
USE_MATHJAX = YES
MATHJAX_VERSION = MathJax_3
MATHJAX_FORMAT = SVG
MATHJAX_RELPATH = mathjax
MATHJAX_EXTENSIONS = ams physics

#-------------------------#
# Diagram generator tools #
#-------------------------#

HAVE_DOT = YES
DOT_IMAGE_FORMAT = svg
INTERACTIVE_SVG = YES
DOT_MULTI_TARGETS = YES
10 changes: 9 additions & 1 deletion helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
'build-essential',
'cmake',
'git',
'graphviz',
'libgnuplot-iostream-dev',
'libgtest-dev',
'libqcustomplot-dev',
Expand All @@ -26,6 +27,7 @@
parser.add_argument('-d', '--deps', action='store_true', help="Install dependencies")
parser.add_argument('-b', '--build', action='store_true', help="Build project (requires profile)")
parser.add_argument('-t', '--test', action='store_true', help='Run tests (requires profile)')
parser.add_argument('--doxygen', action='store_true', help='Generate Doxygen documentation')
parser.add_argument('profile', nargs='?', help="Profile to build and/or test (case-insensitive)")
args = parser.parse_args()

Expand Down Expand Up @@ -54,4 +56,10 @@ def execute_command(command):
execute_command(['cmake', '-DCMAKE_BUILD_TYPE=' + args.profile, '-B', profile_dir])
execute_command(['cmake', '--build', profile_dir, '-j', str(os.cpu_count())])
if args.test:
execute_command(['ctest', '--test-dir', profile_dir, '--verbose'])
execute_command(['ctest', '--test-dir', profile_dir, '--verbose'])
if args.doxygen:
local = 'docs/doxygen/html/mathjax/es5/'
remote = 'https://raw.githubusercontent.com/mathjax/MathJax/refs/tags/3.2.2/es5/'
files = ['tex-svg.js', 'input/tex/extensions/physics.js']
execute_command(['curl', '--create-dirs', '-C', '-', '-Z'] + [i for f in files for i in ['-o', local + f, remote + f]])
execute_command(['doxygen', 'docs/doxygen/Doxyfile'])