diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000000..d81061ddb23 --- /dev/null +++ b/.clang-format @@ -0,0 +1,101 @@ +# Style tries to match doxygen's source code style (not perfect) + +BasedOnStyle: LLVM + +# Do not reflow lines or comments; keeps existing wrapping/spacing. +ColumnLimit: 0 +ReflowComments: false + +# Preserve include order and grouping exactly as written. +SortIncludes: Never +IncludeBlocks: Preserve +SortUsingDeclarations: false + +# Indentation +UseTab: Never +IndentWidth: 2 +ContinuationIndentWidth: 2 +NamespaceIndentation: None +IndentPPDirectives: None +IndentCaseLabels: false +IndentGotoLabels: false +IndentAccessModifiers : true + +# Braces: Allman style (brace on next line for functions, classes, control). +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: true + AfterClass: true + AfterControlStatement: true + AfterEnum: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: true + AfterStruct: true + AfterUnion: true + AfterExternBlock: true + BeforeCatch: true + BeforeElse: true + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true + +# Access specifiers are indented like members in the file. +AccessModifierOffset: 0 +EmptyLineBeforeAccessModifier: Never + +# Short things on one line are common (e.g., inline ctor bodies). +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: true +AllowShortLoopsOnASingleLine: true +AllowShortCaseLabelsOnASingleLine: true +AllowShortLambdasOnASingleLine: All +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true + +# Initializer lists +BreakConstructorInitializers: AfterColon +AllowAllConstructorInitializersOnNextLine: true +ConstructorInitializerAllOnOneLineOrOnePerLine: false + +# Spacing +SpaceBeforeParens: ControlStatements +SpacesInParentheses: false +SpacesInSquareBrackets: false +SpacesInAngles: false +SpaceBeforeSquareBrackets: false +SpaceAfterCStyleCast: false + +# Pointer/reference binding matches code: `Type *name`, `Type &name`. +DerivePointerAlignment: false +PointerAlignment: Right +ReferenceAlignment: Right + +# Keep existing alignment/columns where possible. +AlignTrailingComments: true +AlignOperands: true +AlignConsecutiveAssignments: AcrossEmptyLinesAndComments +AlignConsecutiveDeclarations: AcrossEmptyLinesAndComments +AlignConsecutiveMacros: None +AlignEscapedNewlines: DontAlign +AlignAfterOpenBracket: Align +BreakBeforeBinaryOperators: None + +# Keep moderate vertical spacing, don't aggressively collapse empties. +KeepEmptyLinesAtTheStartOfBlocks: true +MaxEmptyLinesToKeep: 2 + +# Avoid changing braced-init formatting in ways that could churn. +Cpp11BracedListStyle: false + +# Avoid messing with some macros +WhitespaceSensitiveMacros: + - SRCLANGEXT + - ML_TYPE + - TSPEC0 + - TSPEC + - ETYPE + diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 00000000000..1518459c01c --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,11 @@ +Checks: > + -*, + bugprone-use-after-move, + bugprone-infinite-loop, + bugprone-narrowing-conversions, + clang-analyzer-deadcode.DeadStores, + cppcoreguidelines-pro-type-cstyle-cast, + performance-unnecessary-copy-initialization, + performance-for-range-copy, + performance-move-const-arg, + portability-* diff --git a/.codedocs b/.codedocs index 699b91566fa..077aaf51d8b 100644 --- a/.codedocs +++ b/.codedocs @@ -1,3 +1,3 @@ -EXCLUDE = addon cmake doc examples jquery templates testing winbuild src/logos.cpp src/lodepng.cpp +EXCLUDE = addon cmake doc examples jquery templates testing deps/iconv_winbuild src/logos.cpp src/lodepng.cpp FILE_PATTERNS = *.h *.cpp *.md USE_MDFILE_AS_MAINPAGE = src/doxygen.md diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000..f3bb41bd177 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,27 @@ +*~ +.*sw? +\#* +.DS_Store + +*.rej +*.orig + +*.pro +/packages/rpm/doxygen.spec +*.idb +*.pdb + +/doxygen_docs +/doxygen.tag +/build* +/qtools_docs +/warnings.log + +tags + +.idea + +/examples/html/* +/examples/latex/* + +Dockerfile diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..7531b008533 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +# See https://editorconfig.org/ for more information. + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 + +[*.py] +indent_size = 4 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..aeebd08e9d0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +* text=auto eol=lf +* text + +### Protected +*.pdf binary +*.ico binary +*.jpg binary +*.png binary +*.lib binary \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000000..56aba5b48c9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,13 @@ +# These are supported funding model platforms + +github: doxygen +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE/report-a-bug-or-issue.md b/.github/ISSUE_TEMPLATE/report-a-bug-or-issue.md new file mode 100644 index 00000000000..bbb736b1889 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/report-a-bug-or-issue.md @@ -0,0 +1,30 @@ +--- +name: Report a bug or issue +about: Create a report to help us improve doxygen +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +Describe what you see that (you think) is wrong. + +**Screenshots** +If useful, add screenshots to help explain your problem. + +**To Reproduce** +Attach a self contained example that allows us to reproduce the problem. +Such an example typically exist of some source code (can be dummy code) and a doxygen configuration file used (you can strip it using `doxygen -s -u`). After you verified the example demonstrates the problem, put it in a zip (or tarball) and attach it to the bug report. Try to avoid linking to external sources, since they might disappear in the future. + +**Expected behavior** +Describe what you would have expected or think is correct. + +**Version** +Mention the version of doxygen used (output of `doxygen --version`) and the platform on which you run doxygen (e.g. Windows 10, 64 bit). If you run doxygen under Linux please also mention the name and version of the distribution used (output of `lsb_release -a`) and mention if you compiled doxygen yourself or that you use a binary that comes with the distribution or from the doxygen website. + +**Stack trace** +If you encounter a crash and can build doxygen from sources yourself with debug info (`-DCMAKE_BUILD_TYPE=Debug`), a stack trace can be very helpful (especially if it is not possible to capture the problem in a small example that can be shared). + +**Additional context** +Add any other context about the problem here. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000000..2cb7271ea27 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + time: "03:00" + open-pull-requests-limit: 3 diff --git a/.github/workflows/build_cmake.yml b/.github/workflows/build_cmake.yml new file mode 100644 index 00000000000..199db20820b --- /dev/null +++ b/.github/workflows/build_cmake.yml @@ -0,0 +1,454 @@ +name: CMake Build for Doxygen + +on: [push, pull_request] + +jobs: + build: + permissions: + contents: write # to push pages branch (peaceiris/actions-gh-pages) + + name: ${{ matrix.config.name }} + runs-on: ${{ matrix.config.os }} + strategy: + fail-fast: false + matrix: + config: + - { + name: "Ubuntu Latest GCC Release (Intel)", + os: ubuntu-24.04, + build_type: "Release", cc: "gcc", cxx: "g++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES" + } + - { + name: "Ubuntu Latest GCC Debug (Intel)", + os: ubuntu-24.04, + build_type: "Debug", cc: "gcc", cxx: "g++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES" + } + - { + name: "Ubuntu Latest Clang Release (Intel)", + os: ubuntu-24.04, + build_type: "Release", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO" + } + - { + name: "Ubuntu Latest Clang Debug (Intel)", + os: ubuntu-24.04, + build_type: "Debug", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO" + } + + - { + name: "Ubuntu Latest GCC Release (Arm)", + os: ubuntu-24.04-arm, + build_type: "Release", cc: "gcc", cxx: "g++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES" + } + - { + name: "Ubuntu Latest GCC Debug (Arm)", + os: ubuntu-24.04-arm, + build_type: "Debug", cc: "gcc", cxx: "g++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Dbuild_search=YES -Dbuild_app=YES -Dbuild_parse=YES" + } + - { + name: "Ubuntu Latest Clang Release (Arm)", + os: ubuntu-24.04-arm, + build_type: "Release", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO" + } + - { + name: "Ubuntu Latest Clang Debug (Arm)", + os: ubuntu-24.04-arm, + build_type: "Debug", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles", + cmake_extra_opts: "-Duse_libclang=YES -Dstatic_libclang=YES -Duse_libc++=NO" + } + - { + name: "macOS Latest Release (Intel)", + os: macos-15-intel, + build_type: "Release", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles" + } + - { + name: "macOS Latest Debug (Intel)", + os: macos-15-intel, + build_type: "Debug", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles" + } + - { + name: "macOS Latest Release (Apple Silicon)", + os: macos-14, + build_type: "Release", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles" + } + - { + name: "macOS Latest Debug (Apple Silicon)", + os: macos-14, + build_type: "Debug", cc: "clang", cxx: "clang++", + build_gen: "Unix Makefiles" + } + - { + name: "Windows Latest MSVC Debug", + os: windows-latest, + build_type: "Debug", cc: "cl", cxx: "cl", + build_gen: "NMake Makefiles" + } + - { + name: "Windows Latest MSVC Release", + os: windows-latest, + build_type: "Release", cc: "cl", cxx: "cl", + build_gen: "NMake Makefiles" + } + steps: + - name: Checkout doxygen + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Install libiconv (Windows) + uses: suisei-cn/actions-download-file@v1 + with: + url: "https://github.com/pffang/libiconv-for-Windows/releases/download/v1.16/libiconv-for-Windows_1.16.7z" + target: . + if: matrix.config.os == 'windows-latest' + + - name: Install LaTeX (Linux) + run: | + # workaround to avoid hanging on restarting the snapd after installing the firefox snap + sudo snap remove --purge firefox + sudo snap remove --purge snapd + sudo apt remove -y --purge snapd + sudo apt-mark hold snapd + # end workaround + sudo apt update --fix-missing + sudo apt upgrade + sudo apt update + sudo apt-get install texlive texlive-latex-recommended texlive-extra-utils texlive-latex-extra texlive-font-utils + if: startsWith(matrix.config.os,'ubuntu-') + + - name: Install LaTeX (MacOS) + run: | + brew update || true + brew install --cask mactex || true + echo "/Library/TeX/texbin/" >> $GITHUB_PATH + if: startsWith(matrix.config.os,'macos-') + + - name: Install libclang (Ubuntu 24.04) + run: | + sudo apt remove llvm-14 llvm-14-dev llvm-14-tools llvm-14-runtime clang-14 clang-format-14 libclang-common-14-dev libclang-cpp14 libclang1-14 libllvm14 + sudo apt remove llvm-15 llvm-15-dev llvm-15-tools llvm-15-runtime clang-15 clang-format-15 libclang-common-15-dev libclang-cpp15 libclang1-15 libllvm15 + sudo apt remove llvm-16 llvm-16-dev llvm-16-tools llvm-16-runtime clang-16 clang-format-16 libclang-common-16-dev libclang-cpp16 libclang1-16 libllvm16 + sudo apt remove llvm-17 llvm-17-dev llvm-17-tools llvm-17-runtime clang-17 clang-format-17 libclang-common-17-dev libclang-cpp17 libclang1-17 libllvm17 + sudo apt-get autoremove + sudo apt-get clean + sudo apt install -y libclang-common-18-dev libclang-18-dev clang-18 llvm-18 llvm-18-dev + apt list --installed | egrep '(clang|llvm)' + ls -d /usr/lib/llvm-*/include/ + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100 + sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100 + ls -al /usr/bin/clang++ + ls -al /etc/alternatives/clang++ + which clang++ + clang++ -v + if: matrix.config.cc == 'clang' && startsWith(matrix.config.os,'ubuntu-24') + + - name: Install libxapian (Ubuntu 24.04) + run: sudo apt install libxapian-dev + if: startsWith(matrix.config.os,'ubuntu-24') + + - name: Install MikTeX (Windows) + uses: nick-invision/retry@v3 + with: + timeout_minutes: 15 + max_attempts: 5 + retry_wait_seconds: 60 + command: | + choco install miktex --debug --verbose --no-progress --params "/Set:basic" -y + if ($?) { echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 } + if: matrix.config.os == 'windows-latest' + + - name: Configure MikTeX (Windows) + run: | + miktex --admin --verbose packages update-package-database + miktex --admin --verbose packages update + miktex --admin --verbose fndb refresh + initexmf --admin --verbose --set-config-value=[MPM]AutoInstall=1 + initexmf --admin --verbose --update-fndb + initexmf --admin --verbose --mklinks --force + updmap --admin + if: matrix.config.os == 'windows-latest' + + - name: Install Ghostscript (Linux) + run: sudo apt-get install ghostscript + if: startsWith(matrix.config.os,'ubuntu-') + + - name: Install Ghostscript (Windows) + run: + choco install ghostscript + if: matrix.config.os == 'windows-latest' + + - name: Setting Ghostscript paths (Windows) + shell: bash + run: | + export GSpath=`find /c/Prog*/gs -name gswin\*c.exe | sed -e "s/gswin.*c.exe//"` + export PATH="$GSpath:$PATH" + export GSpath=`echo "$GSpath" | sed -e "s%/c%C:%"` + echo "$GSpath" >> $GITHUB_PATH + if: matrix.config.os == 'windows-latest' + + - name: Install xmllint (Linux) + run: sudo apt-get install libxml2-utils + if: startsWith(matrix.config.os,'ubuntu-') + + - name: Install xmllint (MacOS) + run: | + brew update || true + brew upgrade || true + brew install libxml2 + if: startsWith(matrix.config.os,'macos-') + + - name: Install bison (MacOS) + run: | + brew update + brew install bison; + echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH + #echo "/usr/local/opt/bison/bin" >> $GITHUB_PATH + if: startsWith(matrix.config.os,'macos-') + + - name: Install bison/flex (Windows) + run: | + #Choco-Install -PackageName winflexbison + choco install winflexbison3 + if: matrix.config.os == 'windows-latest' + + - name: Install Graphviz (Linux) + run: sudo apt-get install graphviz + if: startsWith(matrix.config.os,'ubuntu-') + + - name: Install Graphviz (MacOS) + run: | + if ! brew install graphviz; then + # Workaround issue with unexpected symlinks: https://github.com/actions/runner-images/issues/6817 + for f in 2to3 idle3 pydoc3 python3 python3-config; do + rm /usr/local/bin/$f || true + done + # Try again + brew install graphviz + fi + if: startsWith(matrix.config.os,'macos-') + + - name: Install Graphviz (Windows) + run: + choco install graphviz.portable + if: matrix.config.os == 'windows-latest' + + - name: Setup VS Environment (Windows) + uses: seanmiddleditch/gha-setup-vsdevenv@master + if: matrix.config.os == 'windows-latest' + + - name: Refresh Env (Windows) + run: | + Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 + refreshenv + if: matrix.config.os == 'windows-latest' + + - name: Install Qt 6.8 + uses: jdpurcell/install-qt-action@v5 + with: + version: 6.8.* + if: matrix.config.os == 'ubuntu-24.04-arm' + + - name: Install Qt 6.2 + uses: jdpurcell/install-qt-action@v5 + with: + version: 6.2.* + if: startsWith(matrix.config.os,'macos-') + + - name: Install Qt 5 + uses: jdpurcell/install-qt-action@v5 + with: + version: 5.* + if: startsWith(matrix.config.os,'macos-')!=true && matrix.config.os != 'ubuntu-24.04-arm' + + - name: Check tool versions (Linux / MacOS) + shell: bash + run: | + echo "=== perl ==="; + perl --version; + echo "=== python ==="; + python --version; + echo "=== cmake ==="; + cmake --version; + echo "=== latex ==="; + latex --version; + echo "=== bibtex ==="; + bibtex --version + echo "=== dvips ==="; + dvips --version + echo "=== bison ==="; + bison --version; + echo "=== flex ==="; + flex --version; + echo "=== dot ==="; + dot -V; + echo "=== ghostscript ==="; + gs --version; + if: matrix.config.os != 'windows-latest' + + - name: Check tool versions (Windows) + shell: bash + run: | + echo "=== perl ==="; + perl --version; + echo "=== python ==="; + python --version; + echo "=== cmake ==="; + cmake --version; + echo "=== latex ==="; + latex --version; + echo "=== bibtex ==="; + bibtex --version + echo "=== dvips ==="; + dvips --version + echo "=== bison ==="; + win_bison --version; + echo "=== flex ==="; + win_flex --version; + echo "=== dot ==="; + dot -V; + echo "=== ghostscript ==="; + gswin64c --version; + if: matrix.config.os == 'windows-latest' + + - name: Configure + shell: cmake -P {0} + run: | + set(ENV{CC} ${{ matrix.config.cc }}) + set(ENV{CXX} ${{ matrix.config.cxx }}) + + execute_process( + COMMAND cmake + -S . + -B build + -D CMAKE_BUILD_TYPE=${{ matrix.config.build_type }} + -G "${{ matrix.config.build_gen }}" + -Dbuild_doc=YES + -Dbuild_wizard=YES + ${{ matrix.config.cmake_extra_opts }} + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Bad exit status") + endif() + + - name: Build + shell: cmake -P {0} + run: | + include(ProcessorCount) + ProcessorCount(N) + execute_process( + COMMAND cmake --build build --parallel ${N} + RESULT_VARIABLE result + OUTPUT_VARIABLE output + ERROR_VARIABLE output + ECHO_OUTPUT_VARIABLE ECHO_ERROR_VARIABLE + ) + if (NOT result EQUAL 0) + string(REGEX MATCH "FAILED:.*$" error_message "${output}") + string(REPLACE "\n" "%0A" error_message "${error_message}") + message("::error::${error_message}") + message(FATAL_ERROR "Build failed") + endif() + + - name: Archive build artifacts + uses: actions/upload-artifact@v6 + with: + name: "${{ matrix.config.name }} build artifacts" + path: build/bin/ + + - name: Run tests (Linux / MacOS) + shell: cmake -P {0} + run: | + set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON") + + execute_process( + COMMAND + cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --man" + cmake --build build --target tests + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Running tests failed!") + endif() + if: matrix.config.os != 'windows-latest' + + - name: Run tests (Windows) + shell: cmake -P {0} + run: | + set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON") + + execute_process( + COMMAND + cmake -E env TEST_FLAGS="--xml --xmlxsd --xhtml --qhp --docbook --rtf --man --pdf" + cmake --build build --target tests + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Running tests failed!") + endif() + if: matrix.config.os == 'windows-latest' + + - name: Generate documentation + shell: cmake -P {0} + run: | + execute_process( + COMMAND cmake --build build --target docs + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Building documentation failed") + endif() + + - name: Archive html documentation artifacts + uses: actions/upload-artifact@v6 + with: + name: "Html documentation artifacts" + path: build/html/ + if: matrix.config.name == 'Ubuntu Latest GCC Release (Intel)' + + - name: Archive Latex documentation artifacts + uses: actions/upload-artifact@v6 + with: + name: "Latex documentation artifacts" + path: build/latex/doxygen_manual.pdf + if: matrix.config.name == 'Ubuntu Latest GCC Release (Intel)' + + - name: Generate Internal documentation + shell: cmake -P {0} + run: | + execute_process( + COMMAND cmake --build build --target docs_internal + RESULT_VARIABLE result + ) + if (NOT result EQUAL 0) + message(FATAL_ERROR "Building internal documentation failed") + endif() + if: matrix.config.name == 'Ubuntu Latest GCC Release (Intel)' + + - name: Publish Internal documentation to Github pages + uses: peaceiris/actions-gh-pages@v4 + with: + deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} + external_repository: doxygen/doxygen-docs + publish_dir: build/doxygen_docs/html + force_orphan: true + if: ${{ github.event_name == 'push' && matrix.config.name == 'Ubuntu Latest GCC Release (Intel)' }} + + diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml new file mode 100644 index 00000000000..1646711e604 --- /dev/null +++ b/.github/workflows/coverity.yml @@ -0,0 +1,80 @@ +name: Coverity for doxygen + +# Just for tests +#on: [push, pull_request] + +# The right schedule +on: + schedule: + - cron: '30 2 * * *' # Run once per day, to avoid Coverity's submission limits + + +permissions: + contents: read + +jobs: + check_date: + runs-on: ubuntu-22.04 + name: Check latest commit + outputs: + should_run: ${{ steps.should_run.outputs.should_run }} + steps: + - uses: actions/checkout@v6 + - name: print latest_commit + run: echo ${{ github.sha }} + + - id: should_run + continue-on-error: true + name: check latest commit is less than a day + if: ${{ github.event_name == 'schedule' }} + run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false" + + scan: + needs: check_date + if: ${{ needs.check_date.outputs.should_run != 'false' }} + runs-on: ubuntu-22.04 + + env: + CC: gcc + DEBIAN_FRONTEND: noninteractive + + steps: + - name: Checkout doxygen + uses: actions/checkout@v6 + + - name: Download Coverity + run: | + wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$TOKEN&project=doxygen%2Fdoxygen" -O coverity_tool.tgz + mkdir cov-scan + tar ax -f coverity_tool.tgz --strip-components=1 -C cov-scan + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + + - name: Setup environment + run: | + echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH + echo "NPROC=$(getconf _NPROCESSORS_ONLN)" >> $GITHUB_ENV + + - name: Configure doxygen + run: | + mkdir build + cmake -S . -B build -D CMAKE_BUILD_TYPE=Release -G "Unix Makefiles" + + - name: Run coverity build/scan + run: | + cd build && cov-build --dir cov-int make -j${NPROC} + + - name: Submit results + run: | + cd build + tar zcf cov-scan.tgz cov-int + curl --form token=$TOKEN \ + --form email=$EMAIL \ + --form file=@cov-scan.tgz \ + --form version="$(git rev-parse HEAD)" \ + --form description="Automatic GHA scan" \ + 'https://scan.coverity.com/builds?project=doxygen%2Fdoxygen' + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + EMAIL: ${{ secrets.COVERITY_SCAN_EMAIL }} + diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml new file mode 100644 index 00000000000..dbffee2176f --- /dev/null +++ b/.github/workflows/docker_publish.yml @@ -0,0 +1,41 @@ +name: Publish Docker package + +on: + release: + types: [published] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Log in to the Container registry + uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Build and push Docker image + uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/doxmlparser-publish.yml b/.github/workflows/doxmlparser-publish.yml new file mode 100644 index 00000000000..d2a4fb5cb31 --- /dev/null +++ b/.github/workflows/doxmlparser-publish.yml @@ -0,0 +1,34 @@ +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build package + run: python -m build -w addon/doxmlparser/ + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: addon/doxmlparser/dist/ + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/texlive.packages b/.github/workflows/texlive.packages new file mode 100644 index 00000000000..63e96416936 --- /dev/null +++ b/.github/workflows/texlive.packages @@ -0,0 +1,4 @@ +collection-latexextra +babel-dutch +cjk +bibtex diff --git a/.github/workflows/texlive.profile b/.github/workflows/texlive.profile new file mode 100644 index 00000000000..21d2105eb3d --- /dev/null +++ b/.github/workflows/texlive.profile @@ -0,0 +1,41 @@ +# Reference: https://www.tug.org/texlive/doc/install-tl.html#PROFILES + +#=[ Schemes ]=================================================================== +# You can pick your scheme. Availability depends upon the package repository, +# but common ones are: infraonly, minimal, basic, small, medium and full. +selected_scheme scheme-medium + +#=[ Collections ]=============================================================== +# For finer control, select `scheme-custom` above and pick your collections. +# You can list them, one per line, as follows: +# collection- 1 + +#=[ Paths ]===================================================================== +# These paths are the defaults in portable mode, which the action enforces. +# They are here for reference only and you should not modify them. +# TEXDIR $TEXLIVE_INSTALL_PREFIX +# TEXMFLOCAL $TEXLIVE_INSTALL_PREFIX/texmf-local +# TEXMFSYSVAR $TEXLIVE_INSTALL_PREFIX/texmf-var +# TEXMFSYSCONFIG $TEXLIVE_INSTALL_PREFIX/texmf-config +# TEXMFVAR $TEXMFSYSVAR +# TEXMFCONFIG $TEXMFSYSCONFIG +# TEXMFHOME $TEXMFLOCAL + +#=[ Installer options ]========================================================= +# Installer options can be provided but most have little use here. +# Note for power users: `instopt_portable` is enforced by the action +# to allow caching, so setting it here has no effect. + +#=[ TeX Live Package DataBase options ]========================================= +# Only three TLPDB options are relevant. Also, you should always set them for +# a responsible usage of storage space. +# Avoid installing package documentation files: +tlpdbopt_install_docfiles 0 +# Avoid installing package source files: +tlpdbopt_install_srcfiles 0 +# Avoid keeping backups: +tlpdbopt_autobackup 0 + +#=[ Platform options ]========================================================== +# You should not set the platform unless you know what you're doing, and let +# tlmgr and the action autodetect it. diff --git a/.gitignore b/.gitignore index 21ebe477aa2..1283dbe4726 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,17 @@ /doxygen_docs /doxygen.tag +/build* +/qtools_docs +/warnings.log + +tags +.cache/ + +.idea +cmake-build-debug/ +cmake-build-debug-event-trace/ +.vscode/ + +/examples/html/* +/examples/latex/* diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0ae48e8c374..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: cpp -compiler: - - gcc - - clang - -before_install: - - sudo apt-add-repository ppa:smspillaz/cmake-2.8.12 -y - - sudo add-apt-repository ppa:texlive-backports/ppa -y - - sudo apt-get update -qq - -install: - - sudo apt-get install -qq texlive texlive-extra-utils texlive-latex-extra libxml2-utils - - sudo apt-get install -qq cmake cmake-data - -script: - - mkdir build - - cd build - - cmake -G "Unix Makefiles" -Dbuild_doc=ON -Dbuild_wizard=ON .. - - make - - make tests - - make docs diff --git a/BUILD.txt b/BUILD.txt index 461a9081c8f..e46c72a55b0 100644 --- a/BUILD.txt +++ b/BUILD.txt @@ -1,25 +1,29 @@ Doxygen uses cmake (http://www.cmake.org/) to build executables for various platforms. -It's required at least cmake version 2.8.12 +See the Installation section of the manual for dependencies and instructions: +https://www.doxygen.nl/manual/install.html + +For a one-step self-contained environment, you can also use Docker to build and run the included Dockerfile. The first step is to create a build directory where the output should be stored. -Doxygen can be fully build outside of the source tree. +Doxygen can be fully built outside of the source tree. The second step is to invoke cmake from within the build directory with the desired generator. -For Linux/Unix systems do the following +For Linux/Unix systems do the following: - mkdir build - cd build - cmake -G "Unix Makefiles" path/to/root/of/doxygen/source/tree - make + mkdir build + cd build + cmake -G "Unix Makefiles" path/to/root/of/doxygen/source/tree + make +Note: "path/to/root/of/doxygen/source/tree" is not the "src" directory but its parent. -This also works for MacOSX, but if XCode is installed you can also generate an XCode project file +This also works for MacOS, but if XCode is installed you can also generate an XCode project file - cmake -G XCode path/to/root/of/doxygen/source/tree + cmake -G XCode path/to/root/of/doxygen/source/tree For Windows one can generate a Visual Studio project using - cmake -G "Visual Studio 12 2013" path\to\root\of\doxygen\source\tree + cmake -G "Visual Studio 12 2013" path\to\root\of\doxygen\source\tree (this is for Visual Studio 12, there are typically also generators for other versions of Visual Studio or other compiler environments like MinGW) @@ -27,28 +31,29 @@ Visual Studio or other compiler environments like MinGW) Doxygen's cmake configuration provides a number of options: - build_wizard Build the GUI frontend for doxygen. - build_app Example showing how to embed doxygen in an application. +- build_parse Parses source code and dumps the dependencies between the code elements. - build_xmlparser Example showing how to parse doxygen's XML output. - build_search Build external search tools (doxysearch and doxyindexer). - build_doc Build user manual. -- use_sqlite3 Add support for sqlite3 output [experimental]. - use_libclang Add support for libclang parsing. +- use_sys_spdlog Use system spdlog library instead of the one bundled. +- use_sys_sqlite3 Use system sqlite3 library instead of the one bundled. - win_static Link with /MT in stead of /MD on windows. -- english_only Only compile in support for the English language. -- force_qt4 Forces doxywizard to build using Qt4 even if Qt5 is installed +- force_qt= Forces doxywizard to build using the specified major version, this can be Qt5 or Qt6 An option can be turned on, by adding -D