mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/workflows/doc-check.yml'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/workflows/doc-check.yml'
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: 0 6 * * 1
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
name: Documentation check for Magick++
|
|
jobs:
|
|
doxygen-check:
|
|
name: Documentation check
|
|
runs-on: ubuntu-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 #v6.2.0
|
|
with:
|
|
python-version: 3.14
|
|
|
|
- name: Install Python dependencies
|
|
run: python -m pip install --user -r .github/build/python/requirements.txt --require-hashes
|
|
|
|
- name: Install Doxygen
|
|
run: sudo apt-get update && sudo apt-get install -y doxygen
|
|
|
|
- name: Compare documentation
|
|
run: |
|
|
diff=""
|
|
# first generate the Magick++ documentation to be up to date with the current code
|
|
cd config && doxygen Magick++.dox.in &> /dev/null
|
|
cd ..
|
|
|
|
# documentation files with function signatures that we can compare with their corresponding doxygen file (currently)
|
|
DOC_HTML=("Blob.html" "CoderInfo.html" "Geometry.html" "Image++.html" "Montage.html" "Pixels.html")
|
|
DOXY_HTML=("Blob.html" "CoderInfo.html" "Geometry.html" "Image.html" "Montage.html" "Pixels.html") # Image.html is the only one that differs from the doxygen file
|
|
for i in "${!DOC_HTML[@]}"; do
|
|
python3 .github/build/scripts/compare-signatures.py www/Magick++/"${DOC_HTML[$i]}" www/api/Magick++/classMagick_1_1"${DOXY_HTML[$i]}"
|
|
if [ $? -eq -1 ]; then
|
|
diff="true"
|
|
fi
|
|
done
|
|
|
|
if [ -n "$diff" ]; then
|
|
echo "Mismatches detected!" && exit 1
|
|
fi
|
|
exit 0
|
|
|