w
Doxygen to Wiki (Gitea-native) / Build Doxygen and publish to Wiki (push) Failing after 27s

This commit is contained in:
2025-08-15 22:04:51 -07:00
parent d09584f1fe
commit 1e0ce71b30
+23 -29
View File
@@ -30,46 +30,40 @@ jobs:
with:
fetch-depth: 0
- name: Install Doxygen, Graphviz, jq, and doxybook2
- name: Install Doxygen, Graphviz, build tools, and build doxybook2 from source
shell: bash
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y doxygen graphviz rsync curl ca-certificates unzip jq
sudo apt-get install -y doxygen graphviz rsync curl ca-certificates jq git build-essential cmake pkg-config ninja-build
ARCH="$(uname -m)"
case "${ARCH}" in
x86_64|amd64) ARCH_TAG="amd64" ;;
aarch64|arm64) ARCH_TAG="arm64" ;;
*) echo "Unsupported architecture: ${ARCH}" >&2; exit 1 ;;
esac
# Discover latest linux asset for our arch from GitHub API
API_URL="https://api.github.com/repos/matusnovak/doxybook2/releases/latest"
ASSET_URL="$(curl -fsSL "${API_URL}" \
| jq -r --arg arch "${ARCH_TAG}" '.assets[] | select(.name | test("linux-" + $arch + "\\\\.(zip|tar\\\\.gz)$")) | .browser_download_url' \
| head -n1)"
# Fallback to known tar.gz naming if API parsing fails
if [ -z "${ASSET_URL}" ] || [ "${ASSET_URL}" = "null" ]; then
ASSET_URL="https://github.com/matusnovak/doxybook2/releases/latest/download/doxybook2-linux-${ARCH_TAG}.tar.gz"
# Build doxybook2 from source (latest release tag). If API fails, use master.
TAG="$(curl -fsSL https://api.github.com/repos/matusnovak/doxybook2/releases/latest | jq -r .tag_name || true)"
if [ -z "${TAG}" ] || [ "${TAG}" = "null" ]; then
TAG="master"
fi
TMP="/tmp/doxybook2-asset"
rm -f "${TMP}.zip" "${TMP}.tar.gz" || true
rm -rf /tmp/doxybook2
git clone --depth 1 --branch "${TAG}" https://github.com/matusnovak/doxybook2.git /tmp/doxybook2
git -C /tmp/doxybook2 submodule update --init --recursive || true
if echo "${ASSET_URL}" | grep -qi '\.zip$'; then
curl -fsSL -o "${TMP}.zip" "${ASSET_URL}"
sudo unzip -j -o "${TMP}.zip" -d /usr/local/bin doxybook2
elif echo "${ASSET_URL}" | grep -qi '\.tar\.gz$'; then
curl -fsSL -o "${TMP}.tar.gz" "${ASSET_URL}"
sudo tar -xzf "${TMP}.tar.gz" -C /usr/local/bin doxybook2
# Prefer Ninja if available, fall back to Makefiles
cmake -S /tmp/doxybook2 -B /tmp/doxybook2/build -G "Ninja" -DCMAKE_BUILD_TYPE=Release || \
cmake -S /tmp/doxybook2 -B /tmp/doxybook2/build -DCMAKE_BUILD_TYPE=Release
cmake --build /tmp/doxybook2/build -j"$(nproc)"
# Install to /usr/local/bin; prefer CMake install, fallback to manual install
if sudo cmake --install /tmp/doxybook2/build 2>/dev/null; then
:
else
echo "Unsupported asset type URL: ${ASSET_URL}" >&2
exit 1
BIN="$(find /tmp/doxybook2/build -type f -executable -name doxybook2 -print -quit)"
if [ -z "${BIN}" ]; then
echo "doxybook2 binary not found in build output" >&2
exit 1
fi
sudo install -m 0755 "${BIN}" /usr/local/bin/doxybook2
fi
sudo chmod +x /usr/local/bin/doxybook2
doxybook2 --version
- name: Build Doxygen (HTML + XML)