diff --git a/.github/workflows/doxygen.yml b/.github/workflows/doxygen.yml new file mode 100644 index 0000000..cb786fc --- /dev/null +++ b/.github/workflows/doxygen.yml @@ -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 \ No newline at end of file diff --git a/.gitignore b/.gitignore index ea597df..3a1e6bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ /build/ /cmake-*/ +/docs/doxygen/html/ + /.idea/* !/.idea/codeStyles/ !/.idea/runConfigurations/ diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile new file mode 100644 index 0000000..400cc76 --- /dev/null +++ b/docs/doxygen/Doxyfile @@ -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 \ No newline at end of file diff --git a/helper.py b/helper.py index 34c06fe..32b8e95 100755 --- a/helper.py +++ b/helper.py @@ -16,6 +16,7 @@ 'build-essential', 'cmake', 'git', + 'graphviz', 'libgnuplot-iostream-dev', 'libgtest-dev', 'libqcustomplot-dev', @@ -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() @@ -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']) \ No newline at end of file + 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']) \ No newline at end of file