Skip to content

Commit 0d3045f

Browse files
authored
Switched link checker (#5807)
Switch link checker to Lychee in GitHub workflow to reduce false positives and update workflow schedules and documentation links.
1 parent 2a756b0 commit 0d3045f

File tree

4 files changed

+85
-24
lines changed

4 files changed

+85
-24
lines changed

.github/workflows/linkchecker.yml

Lines changed: 81 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: linkchecker
1+
name: Link Checker
22

33
on:
44
workflow_dispatch:
@@ -14,38 +14,98 @@ permissions:
1414
contents: read
1515

1616
jobs:
17-
build:
17+
check-links:
18+
name: Check Documentation Links
1819
if: github.event.pull_request.merged == true
1920
runs-on: ubuntu-latest
2021
steps:
21-
- name: get
22+
- name: Checkout Repository
2223
uses: actions/checkout@v4
2324

24-
- name: install
25+
- name: Install System Dependencies
2526
run: |
26-
sudo apt install -y libunwind-dev
27-
sudo apt install -y graphviz
28-
sudo apt install -y --no-install-recommends doxygen
29-
sudo apt install -y cmake
30-
pip3 install linkchecker
27+
sudo apt-get update
28+
sudo apt-get install -y --no-install-recommends \
29+
libunwind-dev \
30+
graphviz \
31+
doxygen \
32+
cmake
3133
32-
- name: build
34+
- name: Build Documentation
35+
id: build_docs
3336
run: |
3437
mkdir build
3538
cd build
3639
cmake -DHDF5_BUILD_DOC:BOOL=ON ..
3740
make doxygen
41+
echo "html_path=$(pwd)/hdf5lib_docs/html" >> $GITHUB_OUTPUT
3842
39-
- name: check
43+
- name: Run Comprehensive Link Check
44+
id: lychee
45+
uses: lycheeverse/[email protected]
46+
with:
47+
args: >
48+
--verbose
49+
--base ${{ steps.build_docs.outputs.html_path }}
50+
--max-retries 4
51+
--max-concurrency 8
52+
--retry-wait-time 10
53+
--timeout 30
54+
--user-agent "Mozilla/5.0 (compatible; Lychee/v0.1)"
55+
--exclude "eigen.tuxfamily.org"
56+
--exclude "gnu.org"
57+
--exclude "en.wikipedia.org"
58+
--exclude "help.hdfgroup.org"
59+
--exclude "libpng.org"
60+
--exclude "my.cdash.org"
61+
--exclude "www.oreilly.com"
62+
--exclude "preshing.com"
63+
--exclude "semver.org"
64+
--exclude "sourceforge.net"
65+
--exclude "www.youtube.com"
66+
--exclude "youtu.be"
67+
--exclude "hdfeos.org"
68+
--exclude "github.com"
69+
--exclude "stackoverflow.com"
70+
--exclude "reddit.com"
71+
--exclude "twitter.com"
72+
--exclude "linkedin.com"
73+
"${{ steps.build_docs.outputs.html_path }}/**/*.html"
74+
output: lychee-report.md
75+
format: markdown
76+
# Let the action fail naturally - we'll handle it in the summary step
77+
fail: true
78+
79+
- name: Publish Report to Job Summary
80+
if: always()
4081
run: |
41-
cd build/hdf5lib_docs/html
42-
linkchecker --no-warnings --ignore-url=eigen.tuxfamily.org --ignore-url=/doxygen.css \
43-
--ignore-url=gnu.org --ignore-url=en.wikipedia.org \
44-
--ignore-url=help.hdfgroup.org --ignore-url=libpng.org \
45-
--ignore-url=my.cdash.org --ignore-url=www.oreilly.com \
46-
--ignore-url=preshing.com --ignore-url=semver.org \
47-
--ignore-url=sourceforge.net --ignore-url=www.youtube.com \
48-
--ignore-url=youtu.be \
49-
--check-extern --threads=2 ./index.html
50-
#continue-on-error: true
82+
echo "## 🔗 Link Checker Report" >> "$GITHUB_STEP_SUMMARY"
83+
84+
# Check if lychee step succeeded or failed
85+
if [ "${{ steps.lychee.outcome }}" = "success" ]; then
86+
echo "✅ **No broken links found!**" >> "$GITHUB_STEP_SUMMARY"
87+
elif [ "${{ steps.lychee.outcome }}" = "failure" ]; then
88+
# Count actual broken links marked with the ❌ emoji.
89+
# Default to 0 if grep finds nothing or fails.
90+
FAILED_COUNT=$(grep -c "❌" lychee-report.md 2>/dev/null || echo 0)
5191
92+
if [ "$FAILED_COUNT" -gt 0 ]; then
93+
echo "❌ **Found $FAILED_COUNT broken link(s)!**" >> "$GITHUB_STEP_SUMMARY"
94+
else
95+
# If the step failed but no broken links found, it's likely a different error
96+
echo "⚠️ **Link checker encountered an error.**" >> "$GITHUB_STEP_SUMMARY"
97+
echo "This may indicate a configuration, network, or file access issue." >> "$GITHUB_STEP_SUMMARY"
98+
fi
99+
else
100+
echo "⚠️ **Link checker step was skipped or cancelled.**" >> "$GITHUB_STEP_SUMMARY"
101+
fi
102+
103+
echo "" >> "$GITHUB_STEP_SUMMARY"
104+
echo "### Full Report:" >> "$GITHUB_STEP_SUMMARY"
105+
if [ -f "lychee-report.md" ]; then
106+
echo '```' >> "$GITHUB_STEP_SUMMARY"
107+
cat lychee-report.md >> "$GITHUB_STEP_SUMMARY"
108+
echo '```' >> "$GITHUB_STEP_SUMMARY"
109+
else
110+
echo "No detailed report available." >> "$GITHUB_STEP_SUMMARY"
111+
fi

.github/workflows/update-progress.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Release Progress
22

33
on:
44
schedule:
5-
- cron: '0 */24 * * *' # Run every 24 hours
5+
- cron: '0 */4 * * *' # Run every 4 hours
66
workflow_dispatch: # Allow manual triggering
77

88
jobs:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ HDF5 version 2.0.0-2 currently under development
1919
[![HDF5 VFD build status](https://img.shields.io/github/actions/workflow/status/HDFGroup/hdf5/vfd.yml?branch=develop&label=HDF5-VFD)](https://github.com/HDFGroup/hdf5/actions/workflows/vfd.yml?query=branch%3Adevelop)
2020
[![BSD](https://img.shields.io/badge/License-BSD-blue.svg)](https://github.com/HDFGroup/hdf5/blob/develop/LICENSE)
2121
[![OSS-Fuzz Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/hdf5.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#hdf5)
22+
[![Link Checker Status](https://github.com/HDFGroup/hdf5/actions/workflows/link-checker.yml/badge.svg)](https://github.com/HDFGroup/hdf5/actions/workflows/link-checker.yml)
2223

2324
[HPC configure/build/test results](https://my.cdash.org/index.php?project=HDF5)
2425

doxygen/dox/VFLTechNote.dox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@ VFL 'write' routine.</td>
812812
</table>
813813

814814
See Rajeev Thakur's papers:
815-
http://www.mcs.anl.gov/~thakur/papers/romio-coll.ps.gz
816-
http://www.mcs.anl.gov/~thakur/papers/mpio-high-perf.ps.gz
815+
https://web.cels.anl.gov/~thakur/papers/mpio-impl.pdf
816+
https://web.cels.anl.gov/~thakur/papers/romio-coll.pdf
817817

818818
\section sec_vfl_reg Registration of a Driver
819819
Before a driver can be used the HDF5 library needs to be told of its existence. This is done by

0 commit comments

Comments
 (0)