ci: use mdbook-linkcheck for docs linting #4062
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Runs
mdbook-linkcheck
[0] on PRs, ensuring that docs are checked for broken links prior to merge. We don't want to slow down per-PR CI runs, so it's important these steps run in parallel, from a warm cache. The cargo test workflow takes ~5m, so as long as we're under that, we should be good.There's another subtle change in here: we reduce the number of CI vCPUs dedicated to these docs-building jobs, ensuring there's more compute available for the CPU-intensive jobs like cargo test. This allows more CI runs in parallel as multiple PRs are modified concurrently. Overall, the per-PR CPU reservation has changed from 80 -> 68. After observing the effect on CI runtimes, I suspect we can finetune further, and even bump up cargo test up to a 32-cpu runner if we gain back enough headroom.
Refs #3994, which recommended the use of mdbook-linkcheck.
[0] https://github.com/Michael-F-Bryan/mdbook-linkcheck