Build Doxygen #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Doxygen | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build-doxygen: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| platform: linux | |
| extension: "" | |
| archive_format: tar.gz | |
| - os: windows-latest | |
| platform: windows | |
| extension: .exe | |
| archive_format: zip | |
| - os: macos-15 | |
| platform: macos | |
| extension: "" | |
| archive_format: tar.gz | |
| - os: macos-15-intel | |
| platform: macos | |
| extension: "" | |
| archive_format: tar.gz | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| ninja-build \ | |
| git \ | |
| python3 \ | |
| python3-pip \ | |
| zlib1g-dev \ | |
| libedit-dev \ | |
| libffi-dev \ | |
| libxml2-dev \ | |
| libtinfo-dev \ | |
| flex \ | |
| bison \ | |
| libfontconfig1-dev \ | |
| libfreetype6-dev \ | |
| libx11-dev \ | |
| libx11-xcb-dev \ | |
| libxext-dev \ | |
| libxfixes-dev \ | |
| libxi-dev \ | |
| libxrender-dev \ | |
| libxcb1-dev \ | |
| libxcb-cursor-dev \ | |
| libxcb-glx0-dev \ | |
| libxcb-keysyms1-dev \ | |
| libxcb-image0-dev \ | |
| libxcb-shm0-dev \ | |
| libxcb-icccm4-dev \ | |
| libxcb-sync-dev \ | |
| libxcb-xfixes0-dev \ | |
| libxcb-shape0-dev \ | |
| libxcb-randr0-dev \ | |
| libxcb-render-util0-dev \ | |
| libxcb-util-dev \ | |
| libxcb-xinerama0-dev \ | |
| libxcb-xkb-dev \ | |
| libxkbcommon-dev \ | |
| libxkbcommon-x11-dev \ | |
| libgl1-mesa-dev \ | |
| libglu1-mesa-dev \ | |
| uuid-dev \ | |
| texlive \ | |
| texlive-latex-recommended \ | |
| texlive-extra-utils \ | |
| texlive-latex-extra \ | |
| texlive-font-utils \ | |
| ghostscript \ | |
| graphviz | |
| shell: bash | |
| - name: Install dependencies (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| choco install ninja winflexbison3 ghostscript graphviz.portable innosetup | |
| shell: bash | |
| - name: Install MikTeX (Windows) | |
| if: matrix.platform == '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 } | |
| - name: Configure MikTeX (Windows) | |
| if: matrix.platform == '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 | |
| - name: Setting Ghostscript paths (Windows) | |
| if: matrix.platform == 'windows' | |
| 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 | |
| shell: bash | |
| - name: Refresh Env (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 | |
| refreshenv | |
| - name: Check tool versions (Windows) | |
| if: matrix.platform == 'windows' | |
| 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; | |
| shell: bash | |
| - name: Install dependencies (macOS) | |
| if: matrix.platform == 'macos' | |
| run: | | |
| brew install cmake ninja flex bison ossp-uuid | |
| # make sure flex and bison from brew are found and not the one from the system. | |
| echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH | |
| echo "$(brew --prefix flex)/bin" >> $GITHUB_PATH | |
| echo "LOC=$(brew --prefix ossp-uuid)" | |
| shell: bash | |
| - name: Set up MSVC dev command prompt (Windows) | |
| if: matrix.platform == 'windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Download htmlhelp (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| # curl -L -o htmlhelp.exe http://web.archive.org/web/20160201063255/http://download.microsoft.com/download/0/A/9/0A939EF6-E31C-430F-A3DF-DFAE7960D564/htmlhelp.exe | |
| ./htmlhelp.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART | |
| shell: pwsh | |
| - name: Verify hhc.exe is installed | |
| if: matrix.platform == 'windows' | |
| shell: powershell | |
| run: | | |
| $possiblePaths = @( | |
| "$env:ProgramFiles(x86)\HTML Help Workshop\hhc.exe", | |
| "$env:ProgramFiles\HTML Help Workshop\hhc.exe", | |
| "$env:ProgramFiles(x86)\HTMLHelpWorkshop\hhc.exe", | |
| "$env:ProgramFiles\HTMLHelpWorkshop\hhc.exe" | |
| ) | |
| # Find first existing file | |
| $installed = $possiblePaths | Where-Object { Test-Path $_ } | Select-Object -First 1 | |
| # Fallback: on PATH | |
| if (-not $installed) { | |
| $cmd = Get-Command hhc.exe -ErrorAction SilentlyContinue | |
| if ($cmd) { $installed = $cmd.Path } | |
| } | |
| if (-not $installed) { | |
| Write-Error "hhc.exe not found in known locations or PATH." | |
| exit 1 | |
| } | |
| Write-Host "hhc.exe found at: $installed" | |
| $fi = Get-Item $installed | |
| Write-Host "FileVersion: $($fi.VersionInfo.FileVersion)" | |
| Write-Host "ProductVersion: $($fi.VersionInfo.ProductVersion)" | |
| - name: Download zlib (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| curl -L -o zlib.tgz https://zlib.net/zlib-1.3.1.tar.gz | |
| tar zxvf zlib.tgz | |
| - name: Build zlib (Windows) | |
| if: matrix.platform == 'windows' | |
| shell: cmd | |
| run: | | |
| cd zlib-1.3.1 | |
| @rem nmake -f win32\Makefile.msc LOC="-MT" all | |
| nmake -f win32\Makefile.msc LOC="-MT" zlib.lib | |
| - name: Get latest Doxygen release tag | |
| id: doxygen-version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| set -euo pipefail | |
| echo "GITHUB_TOKEN present: ${GITHUB_TOKEN:+yes}" | |
| # Retry loop with exponential backoff | |
| attempts=5 | |
| sleep_for=2 | |
| for i in $(seq 1 $attempts); do | |
| echo "Attempt $i..." | |
| resp=$(curl -sS -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/doxygen/doxygen/releases/latest" ) || true | |
| http_code=$(echo "$resp" | jq -r '. | if has("message") then "error" else "ok" end') | |
| tag=$(echo "$resp" | jq -r '.tag_name // empty') | |
| if [ -n "$tag" ]; then | |
| LATEST_TAG="$tag" | |
| break | |
| fi | |
| echo "No tag found. API response (truncated):" | |
| echo "$resp" | jq -C '.' | sed -n '1,200p' | |
| echo "Sleeping $sleep_for seconds before retry..." | |
| sleep $sleep_for | |
| sleep_for=$((sleep_for * 2)) | |
| done | |
| if [ -z "${LATEST_TAG:-}" ]; then | |
| echo "Error: Could not fetch Doxygen release tag; last response:" | |
| echo "$resp" | jq -C '.' || echo "$resp" | |
| exit 1 | |
| fi | |
| echo "Latest Doxygen release: $LATEST_TAG" | |
| echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT | |
| # Remove leading 'Release_' prefix if present | |
| VERSION=${LATEST_TAG#Release_} | |
| VERSION=${VERSION//_/.} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| shell: bash | |
| #- name: Cache Doxygen source | |
| # id: cache-doxygen-source | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: doxygen | |
| # key: doxygen-source-${{ steps.doxygen-version.outputs.tag }}-${{ matrix.os }} | |
| - name: Download Doxygen source code | |
| #if: steps.cache-doxygen-source.outputs.cache-hit != 'true' | |
| run: | | |
| echo "Downloading Doxygen ${{ steps.doxygen-version.outputs.tag }}" | |
| #git clone --depth 1 --branch ${{ steps.doxygen-version.outputs.tag }} https://github.com/doxygen/doxygen.git | |
| git clone --depth 1 --branch master https://github.com/doxygen/doxygen.git | |
| if [ ! -d "doxygen" ]; then | |
| echo "Error: Doxygen source download failed or directory structure is incorrect" | |
| exit 1 | |
| fi | |
| echo "Doxygen source downloaded successfully" | |
| shell: bash | |
| - name: Download LLVM artifacts | |
| uses: dawidd6/action-download-artifact@v11 | |
| with: | |
| workflow: build-llvm.yml | |
| name: llvm-static-.*-${{ matrix.os }} | |
| name_is_regexp: true | |
| path: llvm-artifact | |
| skip_unpack: false | |
| - name: Extract LLVM version from artifact | |
| id: llvm-version | |
| run: | | |
| cd llvm-artifact | |
| FILENAME=$(ls llvm-static-* | head -1) | |
| VERSION=$(echo "$FILENAME" | sed -E 's/llvm-static-(.+)-${{ matrix.os }}.*/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "LLVM version from artifact: $VERSION" | |
| shell: bash | |
| - name: Download Qt6 artifacts | |
| uses: dawidd6/action-download-artifact@v11 | |
| with: | |
| workflow: build-qt6.yml | |
| name: qt6-static-.*-${{ matrix.os }} | |
| name_is_regexp: true | |
| path: qt6-artifact | |
| skip_unpack: false | |
| - name: Extract Qt6 version from artifact | |
| id: qt6-version | |
| run: | | |
| cd qt6-artifact | |
| FILENAME=$(ls qt6-static-* | head -1) | |
| VERSION=$(echo "$FILENAME" | sed -E 's/qt6-static-(.+)-${{ matrix.os }}.*/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Qt6 version from artifact: $VERSION" | |
| shell: bash | |
| - name: Download Xapian artifacts | |
| uses: dawidd6/action-download-artifact@v11 | |
| with: | |
| workflow: build-xapian.yml | |
| name: xapian-static-.*-${{ matrix.os }} | |
| name_is_regexp: true | |
| path: xapian-artifact | |
| skip_unpack: false | |
| - name: Extract Xapian version from artifact | |
| id: xapian-version | |
| run: | | |
| cd xapian-artifact | |
| FILENAME=$(ls xapian-static-* | head -1) | |
| VERSION=$(echo "$FILENAME" | sed -E 's/xapian-static-(.+)-${{ matrix.os }}.*/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Xapian version from artifact: $VERSION" | |
| shell: bash | |
| - name: Extract LLVM artifacts (Linux/macOS) | |
| if: matrix.platform != 'windows' | |
| run: | | |
| mkdir -p llvm-install | |
| cd llvm-artifact/llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }} | |
| # Extract the tar.gz archive to the install directory | |
| tar -xzf llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }}.tar.gz -C ../../llvm-install | |
| shell: bash | |
| - name: Extract LLVM artifacts (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| mkdir llvm-install | |
| dir | |
| cd llvm-artifact\llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }} | |
| dir | |
| # Extract the zip archive to the install directory | |
| Expand-Archive -Path "llvm-static-${{ steps.llvm-version.outputs.version }}-${{ matrix.os }}.zip" -DestinationPath "../../llvm-install" | |
| shell: pwsh | |
| - name: Extract Qt6 artifacts (Linux/macOS) | |
| if: matrix.platform != 'windows' | |
| run: | | |
| mkdir -p qt6-install | |
| cd qt6-artifact/qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }} | |
| # Extract the tar.gz archive to the install directory | |
| tar -xzf qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.tar.gz -C ../../qt6-install | |
| shell: bash | |
| - name: Extract Qt6 artifacts (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| mkdir qt6-install | |
| cd qt6-artifact\qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }} | |
| # Extract the zip archive to the install directory | |
| Expand-Archive -Path "qt6-static-${{ steps.qt6-version.outputs.version }}-${{ matrix.os }}.zip" -DestinationPath "../../qt6-install" | |
| shell: pwsh | |
| - name: Extract Xapian artifacts (Linux/macOS) | |
| if: matrix.platform != 'windows' | |
| run: | | |
| mkdir -p xapian-install | |
| cd xapian-artifact/xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }} | |
| # Extract the tar.gz archive to the install directory | |
| tar -xzf xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.tar.gz -C ../../xapian-install | |
| shell: bash | |
| - name: Extract Xapian artifacts (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| mkdir xapian-install | |
| cd xapian-artifact\xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }} | |
| # Extract the zip archive to the install directory | |
| Expand-Archive -Path "xapian-static-${{ steps.xapian-version.outputs.version }}-${{ matrix.os }}.zip" -DestinationPath "../../xapian-install" | |
| shell: pwsh | |
| - name: Configure CMake for Doxygen (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| mkdir -p doxygen/build | |
| cd doxygen/build | |
| UUID_FLAG="-DUUID_LIB=/lib/x86_64-linux-gnu/libuuid.a" | |
| echo "UUID_FLAG=$UUID_FLAG" | |
| cmake .. -G "Unix Makefiles" \ | |
| -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ | |
| -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/doxygen-install" \ | |
| -DXAPIAN_LIBRARIES="${{ github.workspace }}/xapian-install/lib/libxapian.a" \ | |
| -DXAPIAN_INCLUDE_DIR="${{ github.workspace }}/xapian-install/include" \ | |
| -DXAPIAN_DIR="${{ github.workspace }}/xapian-install/lib/cmake/xapian" $UUID_FLAG \ | |
| -DLLVM_DIR="${{ github.workspace }}/llvm-install/lib/cmake/llvm" \ | |
| -DClang_DIR="${{ github.workspace }}/llvm-install/lib/cmake/clang" \ | |
| -DQt6_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6" \ | |
| -DQt6Core_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Core" \ | |
| -DQt6Gui_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Gui" \ | |
| -DQt6Widgets_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Widgets" \ | |
| -Dbuild_doc=YES \ | |
| -Dbuild_search=YES \ | |
| -Dbuild_wizard=YES \ | |
| -Duse_libclang=YES \ | |
| -Dstatic_libclang=YES \ | |
| -Dstatic_libxapian=YES \ | |
| -Dforce_qt=Qt6 \ | |
| -DCMAKE_PREFIX_PATH="${{ github.workspace }}/llvm-install;${{ github.workspace }}/qt6-install;${{ github.workspace }}/xapian-install" | |
| shell: bash | |
| - name: Build Doxygen (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| cd doxygen/build | |
| make -j$(nproc) | |
| make docs | |
| make install | |
| shell: bash | |
| - name: Configure CMake for Doxygen (macOS) | |
| if: matrix.platform == 'macos' | |
| run: | | |
| mkdir -p doxygen/build | |
| cd doxygen/build | |
| UUID_FLAG="-DUUID_LIB=$(brew --prefix ossp-uuid)/lib/libuuid.a" | |
| echo "UUID_FLAG=$UUID_FLAG" | |
| cmake .. -G "Unix Makefiles" \ | |
| -DCMAKE_BUILD_TYPE="${{ env.BUILD_TYPE }}" \ | |
| -DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/doxygen-install" \ | |
| -DXAPIAN_LIBRARIES="${{ github.workspace }}/xapian-install/lib/libxapian.a" \ | |
| -DXAPIAN_INCLUDE_DIR="${{ github.workspace }}/xapian-install/include" \ | |
| -DXAPIAN_DIR="${{ github.workspace }}/xapian-install/lib/cmake/xapian" $UUID_FLAG \ | |
| -DLLVM_DIR="${{ github.workspace }}/llvm-install/lib/cmake/llvm" \ | |
| -DClang_DIR="${{ github.workspace }}/llvm-install/lib/cmake/clang" \ | |
| -DQt6_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6" \ | |
| -DQt6Core_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Core" \ | |
| -DQt6Gui_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Gui" \ | |
| -DQt6Widgets_DIR="${{ github.workspace }}/qt6-install/lib/cmake/Qt6Widgets" \ | |
| -Dbuild_search=YES \ | |
| -Dbuild_wizard=YES \ | |
| -Duse_libclang=YES \ | |
| -Dstatic_libclang=YES \ | |
| -Dstatic_libxapian=YES \ | |
| -Dforce_qt=Qt6 \ | |
| -DCMAKE_PREFIX_PATH="${{ github.workspace }}/llvm-install;${{ github.workspace }}/qt6-install;${{ github.workspace }}/xapian-install" | |
| shell: bash | |
| - name: Build Doxygen (macOS) | |
| if: matrix.platform == 'macos' | |
| run: | | |
| cd doxygen/build | |
| cmake --build . --parallel 2 | |
| shell: bash | |
| - name: Configure CMake for Doxygen (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| mkdir doxygen\build | |
| cd doxygen\build | |
| cmake .. -G "Ninja" -Dwin_static=YES -Dbuild_search=YES -Dbuild_wizard=YES -Duse_libclang=YES -Dstatic_libclang=YES -Dforce_qt=Qt6 -Dbuild_doc=YES -Dbuild_doc_chm=YES ^ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} ^ | |
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}\doxygen-install ^ | |
| -DXAPIAN_LIBRARIES=${{ github.workspace }}\xapian-install\lib\xapian.lib ^ | |
| -DXAPIAN_INCLUDE_DIR=${{ github.workspace }}\xapian-install\include ^ | |
| -DXAPIAN_DIR=${{ github.workspace }}\xapian-install\lib\cmake\xapian ^ | |
| -DLLVM_DIR=${{ github.workspace }}\llvm-install\lib\cmake\llvm ^ | |
| -DClang_DIR=${{ github.workspace }}\llvm-install\lib\cmake\clang ^ | |
| -DCLANG_LIBS=${{ github.workspace }}\llvm-install\lib\libclang.lib ^ | |
| -DQt6_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6 ^ | |
| -DQt6Core_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6Core ^ | |
| -DQt6Gui_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6Gui ^ | |
| -DQt6Widgets_DIR=${{ github.workspace }}\qt6-install\lib\cmake\Qt6Widgets ^ | |
| -DZLIB_LIBRARY=${{ github.workspace }}\zlib-1.3.1\zlib.lib ^ | |
| -DZLIB_INCLUDE_DIR=${{ github.workspace }}\zlib-1.3.1\include | |
| shell: cmd | |
| - name: Build Doxygen (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| cd doxygen\build | |
| cmake --build . --parallel | |
| shell: cmd | |
| - name: Build Doxygen docs (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| cd doxygen\build | |
| cmake --build . --parallel 1 --target docs | |
| cmake --build . --parallel 1 --target docs_chm | |
| shell: cmd | |
| - name: Install Doxygen (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| cd doxygen\build | |
| cmake --install . | |
| shell: cmd | |
| - name: Verify Doxygen build (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| echo "Checking Doxygen binary..." | |
| ls -lh ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} | |
| # Try to run doxygen to verify it works | |
| ${{ github.workspace }}/doxygen-install/bin/doxygen${{ matrix.extension }} --version || echo "Note: doxygen version check failed (may be expected on some platforms)" | |
| shell: bash | |
| - name: Verify Doxygen build (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| echo "Checking Doxygen binary..." | |
| ls -lh ${{ github.workspace }}\doxygen-install\bin\doxygen${{ matrix.extension }} | |
| ${{ github.workspace }}\doxygen-install\bin\doxygen${{ matrix.extension }} --version || echo "Note: doxygen version check failed (may be expected on some platforms)" | |
| shell: cmd | |
| - name: Create installer (Windows) | |
| if: matrix.platform == 'windows' | |
| run: | | |
| subst R: ${{ github.workspace }} | |
| mkdir installer | |
| copy R:\llvm-install\bin\libclang.dll ${{ github.workspace }}\doxygen-install\bin | |
| editbin R:\doxygen-install\bin\doxygen.exe /SUBSYSTEM:CONSOLE,6.00 /OSVERSION:5.1 | |
| editbin R:\doxygen-install\bin\doxyindexer.exe /SUBSYSTEM:CONSOLE,6.00 /OSVERSION:5.1 | |
| editbin R:\doxygen-install\bin\doxysearch.cgi.exe /SUBSYSTEM:CONSOLE,6.00 /OSVERSION:5.1 | |
| Write-Host "Using version: '${{ steps.doxygen-version.outputs.version }}'" | |
| (Get-Content .\doxygen.iss -Raw) -replace '\$VERSION','${{ steps.doxygen-version.outputs.version }}' | Set-Content -Encoding ASCII .\doxygen-versioned.iss | |
| # invoke the inno setup compiler | |
| $iscc = Get-Command ISCC.exe -ErrorAction SilentlyContinue | |
| if (-not $iscc) { | |
| Write-Error "ISCC.exe not found. Checked: $($possible -join '; ') and PATH." | |
| exit 1 | |
| } | |
| & iscc 'doxygen-versioned.iss' | |
| if ($LASTEXITCODE -ne 0) { Write-Error "ISCC failed with exit code $LASTEXITCODE"; exit $LASTEXITCODE } | |
| $doxygen_chm_files = @( | |
| 'R:\doxygen-install\share\doc\packages\doxygen\doxygen_manual.chm' | |
| ) | |
| Compress-Archive -Path $doxygen_chm_files -DestinationPath 'R:\installer\doxygen_manual-${{ steps.doxygen-version.outputs.version }}.chm.zip' -Force | |
| $doxygen_zip_files = @( | |
| 'R:\doxygen-install\bin\doxysearch.cgi.exe', | |
| 'R:\doxygen-install\bin\doxyindexer.exe', | |
| 'R:\doxygen-install\bin\doxywizard.exe' | |
| 'R:\doxygen-install\bin\doxygen.exe' | |
| 'R:\doxygen-install\bin\libclang.dll' | |
| ) | |
| Compress-Archive -Path $doxygen_zip_files -DestinationPath 'R:\installer\doxygen-${{ steps.doxygen-version.outputs.version }}.x64.bin.zip' -Force | |
| shell: powershell | |
| - name: Create installer (macOS) | |
| if: matrix.platform == 'macos' | |
| run: | | |
| mkdir installer | |
| # create DMG file | |
| mkdir image | |
| bunzip2 -k macosx/template.sparseimage.bz2 | |
| hdiutil attach macosx/template.sparseimage -noautoopen -quiet -mountpoint image | |
| cp -a macosx/Doxygen.app image | |
| cp -a macosx/Readme.rtf image | |
| mkdir -p image/Doxygen.app/Contents/MacOS | |
| sed -i -e "s/\$VERSION/${{ steps.doxygen-version.outputs.version }}/g" image/Doxygen.app/Contents/Info.plist | |
| cp doxygen/build/bin/doxygen image/Doxygen.app/Contents/Resources | |
| cp doxygen/build/bin/doxyindexer image/Doxygen.app/Contents/Resources | |
| cp doxygen/build/bin/doxysearch.cgi image/Doxygen.app/Contents/Resources | |
| cp doxygen/build/bin/doxywizard image/Doxygen.app/Contents/MacOS/Doxywizard | |
| /usr/sbin/diskutil rename image Doxygen | |
| hdiutil detach image | |
| hdiutil convert -format UDCO -o installer/Doxygen-${{ steps.doxygen-version.outputs.version }}.dmg macosx/template.sparseimage | |
| xattr -c installer/Doxygen-${{ steps.doxygen-version.outputs.version }}.dmg | |
| shell: bash | |
| - name: Create installer (Linux) | |
| if: matrix.platform == 'linux' | |
| run: | | |
| VERSION=${{ steps.doxygen-version.outputs.version }} | |
| # create installer dir | |
| mkdir -p installer | |
| # create source package | |
| tar -C doxygen --exclude bin -c -v -f installer/doxygen-$VERSION.src.tar.gz \ | |
| doc doc_internal deps vhdlparser libxml libversion examples addon src testing templates cmake \ | |
| CMakeLists.txt BUILD.txt INSTALL LANGUAGE.HOWTO LICENSE README.md | |
| # create PDF version of the manual | |
| cp doxygen/build/latex/doxygen_manual.pdf installer/doxygen_manual-$VERSION.pdf | |
| cd installer | |
| zip -m doxygen_manual-$VERSION.pdf.zip doxygen_manual-$VERSION.pdf | |
| cd .. | |
| # create binary package for Linux | |
| DESTDIR=package/doxygen-$VERSION | |
| mkdir -p $DESTDIR | |
| cat linux/README.bin | sed -e "s/\$VERSION/$VERSION/g" -e "s/\$DATE/`date +\"%d %B %Y\"`/g" >$DESTDIR/README | |
| cp doxygen/LICENSE $DESTDIR | |
| cp linux/Makefile.bin.in $DESTDIR/Makefile | |
| cat doxygen/INSTALL | sed -e "s/\$VERSION/$VERSION/g" -e "s/\$DATE/`date +\"%d %B %Y\"`/g" >$DESTDIR/INSTALL | |
| mkdir $DESTDIR/bin | |
| mkdir -p $DESTDIR/man/man1 | |
| cp -a doxygen/build/html $DESTDIR | |
| cp -a doxygen/build/examples $DESTDIR | |
| cp doxygen/build/bin/doxygen $DESTDIR/bin | |
| cp doxygen/build/latex/doxygen_manual.pdf $DESTDIR/doxygen_manual-$VERSION.pdf | |
| cp doxygen/build/bin/doxyindexer $DESTDIR/bin | |
| cp doxygen/build/bin/doxysearch.cgi $DESTDIR/bin | |
| cp doxygen/build/bin/doxywizard $DESTDIR/bin | |
| cp doxygen/build/man/*.1 $DESTDIR/man/man1 | |
| gzip $DESTDIR/man/man1/* | |
| tar -C package -z -c -v -f installer/doxygen-$VERSION.linux.bin.tar.gz doxygen-$VERSION | |
| shell: bash | |
| - name: Upload Doxygen build (Windows/setup.exe) | |
| if: matrix.platform == 'windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doxygen-${{ steps.doxygen-version.outputs.version }}-setup.exe | |
| path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}-setup.exe | |
| - name: Upload Doxygen build (Windows/doxygen-x64.zip) | |
| if: matrix.platform == 'windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doxygen-${{ steps.doxygen-version.outputs.version }}-x64.bin.zip | |
| path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}-x64.bin.zip | |
| - name: Upload Doxygen build (Windows/doxygen_manual.chm) | |
| if: matrix.platform == 'windows' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doxygen_manual-${{ steps.doxygen-version.outputs.version }}.chm.zip | |
| path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}.chm.zip | |
| - name: Upload Doxygen build (macOS/doxygen.dmg) | |
| if: matrix.platform == 'macos' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Doxygen-${{ steps.doxygen-version.outputs.version }}.dmg | |
| path: installer/Doxygen-${{ steps.doxygen-version.outputs.version }}.dmg | |
| - name: Upload Doxygen build (Linux/doxygen.src.tar.gz) | |
| if: matrix.platform == 'linux' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doxygen-${{ steps.doxygen-version.outputs.version }}.src.tar.gz | |
| path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}.src.tar.gz | |
| - name: Upload Doxygen build (Linux/doxygen.linux.bin.tar.gz) | |
| if: matrix.platform == 'linux' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doxygen-${{ steps.doxygen-version.outputs.version }}.linux.bin.tar.gz | |
| path: installer/doxygen-${{ steps.doxygen-version.outputs.version }}.linux.tar.gz | |
| - name: Upload Doxygen build (Linux/doxygen_manual.pdf.zip) | |
| if: matrix.platform == 'linux' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: doxygen_manual-${{ steps.doxygen-version.outputs.version }}.pdf.zip | |
| path: installer/doxygen_manual-${{ steps.doxygen-version.outputs.version }}.pdf.zip | |
| - name: Display build summary | |
| run: | | |
| echo "## Doxygen Build Summary (${{ matrix.platform }})" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Platform**: ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **OS**: ${{ matrix.os }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Doxygen Version**: ${{ steps.doxygen-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Build Type**: ${{ env.BUILD_TYPE }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **LLVM Version**: ${{ steps.llvm-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Qt6 Version**: ${{ steps.qt6-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Xapian Version**: ${{ steps.xapian-version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Archive Format**: ${{ matrix.archive_format }}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### CMake Configuration" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dbuild_doc=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dbuild_search=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dbuild_wizard=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dbuild_app=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dbuild_parse=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Duse_libclang=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dstatic_libclang=YES" >> $GITHUB_STEP_SUMMARY | |
| echo "-Dforce_qt=Qt6" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Installed Components" >> $GITHUB_STEP_SUMMARY | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| find ${{ github.workspace }}/doxygen-install/bin -type f -executable 2>/dev/null | head -20 >> $GITHUB_STEP_SUMMARY || true | |
| echo "\`\`\`" >> $GITHUB_STEP_SUMMARY | |
| shell: bash |