Skip to content

Commit 62d90ce

Browse files
committed
Install specific Doxygen version with brew on macOS. Issue with Doxygen 1.18.0 might be related to doxygen/doxygen#12326
1 parent 8e71bb1 commit 62d90ce

1 file changed

Lines changed: 5 additions & 48 deletions

File tree

‎.github/workflows/macosmatrix.yml‎

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -56,54 +56,11 @@ jobs:
5656
# if: runner.os=='macOS'
5757
- run: brew install catch2 # Issues with binary packages when cross-compiling...
5858
if: (runner.os=='macOS')&&(matrix.cfg.cross!=true)
59-
# Doxygen 1.18.0 crashes when parsing Codac headers on macOS.
60-
# Doxygen 1.16.1 ARM64 binaries require macOS 15: build from source on macOS 14.
61-
- name: Install Doxygen 1.16.1
62-
shell: bash
63-
env:
64-
GH_TOKEN: ${{ github.token }}
65-
run: |
66-
set -euo pipefail
67-
case "${{ matrix.cfg.arch }}" in
68-
arm64) archive="doxygen-1.16.1.src.tar.gz" ;;
69-
x86_64) archive="doxygen-1.16.1-mac-intel.zip" ;;
70-
*) echo "Unsupported architecture" >&2; exit 1 ;;
71-
esac
72-
tmpdir="$(mktemp -d)"
73-
trap 'rm -rf "$tmpdir"' EXIT
74-
75-
# Verify the archive using its official GitHub release SHA-256 digest.
76-
expected_sha="$(
77-
curl -fsSL --retry 3 \
78-
-H "Authorization: Bearer ${GH_TOKEN}" \
79-
-H "Accept: application/vnd.github+json" \
80-
https://api.github.com/repos/doxygen/doxygen/releases/tags/Release_1_16_1 \
81-
| python3 -c 'import json,sys; a=next(x for x in json.load(sys.stdin)["assets"] if x["name"]==sys.argv[1]); d=a["digest"]; assert d and d.startswith("sha256:") and len(d)==71; print(d[7:])' "$archive"
82-
)"
83-
curl -fsSL --retry 3 \
84-
"https://github.com/doxygen/doxygen/releases/download/Release_1_16_1/${archive}" \
85-
-o "$tmpdir/$archive"
86-
echo "${expected_sha} ${tmpdir}/${archive}" | shasum -a 256 -c
87-
88-
if [[ "${{ matrix.cfg.arch }}" == arm64 ]]; then
89-
brew install ninja flex bison
90-
mkdir "$tmpdir/src"
91-
tar -xzf "$tmpdir/$archive" -C "$tmpdir/src"
92-
export PATH="$(brew --prefix flex)/bin:$(brew --prefix bison)/bin:$PATH"
93-
cmake -G Ninja -S "$tmpdir/src/doxygen-1.16.1" -B "$tmpdir/build" \
94-
-DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
95-
-Dbuild_wizard=OFF -Dbuild_doc=OFF -Duse_libclang=OFF
96-
cmake --build "$tmpdir/build" --target doxygen --parallel 4
97-
doxygen_bin="$tmpdir/build/bin/doxygen"
98-
else
99-
unzip -q "$tmpdir/$archive" -d "$tmpdir/unpacked"
100-
doxygen_bin="$(find "$tmpdir/unpacked" -type f -name doxygen -print -quit)"
101-
fi
102-
103-
mkdir -p "$RUNNER_TEMP/codac-doxygen-bin"
104-
install -m 755 "$doxygen_bin" "$RUNNER_TEMP/codac-doxygen-bin/doxygen"
105-
echo "$RUNNER_TEMP/codac-doxygen-bin" >> "$GITHUB_PATH"
106-
"$RUNNER_TEMP/codac-doxygen-bin/doxygen" --version
59+
# Doxygen 1.18.0 crashes when parsing Codac headers on macOS.
60+
- run: |
61+
wget https://github.com/lebarsfa/xbrew/releases/latest/download/xbrew.sh --no-check-certificate -nv ; sudo mv -f xbrew.sh /usr/local/bin/xbrew ; sudo chmod +x /usr/local/bin/xbrew
62+
xbrew reinstall https://github.com/Homebrew/homebrew-core/raw/1d8f87380f143b838b0d6a10068e7488db79ba5d/Formula/d/doxygen.rb ; brew pin --formula doxygen
63+
if: runner.os=='macOS'
10764
- run: brew install graphviz ; python -m pip install --upgrade pip ; pip install --upgrade wheel setuptools sphinx breathe sphinx_rtd_theme sphinx-tabs sphinx-issues sphinx-reredirects furo sphinx-math-dollar sphinx_togglebutton sympy
10865
if: runner.os=='macOS'
10966
- run: |

0 commit comments

Comments
 (0)