-
Notifications
You must be signed in to change notification settings - Fork 294
[codex] Add lychee docs link checks and stable source links #2159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kkraus14
wants to merge
17
commits into
main
Choose a base branch
from
codex/docs-stable-source-linkcheck
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e3d734c
Check versioned docs example links
kkraus14 1123759
Add pathfinder docs linkcheck
kkraus14 a90437e
Check docs example links locally
kkraus14 8699ddd
Add lychee docs link checking
kkraus14 e9744b4
Skip lychee on pre-commit.ci
kkraus14 6e111a2
Check rendered doc preview links with lychee
kkraus14 0f2bb16
Fix doc preview wait step
kkraus14 e9f64da
Use lychee-action default binary
kkraus14 8e53035
Address docs review comments
kkraus14 54c5772
Use fixed lychee-action revision
kkraus14 40cb8d8
Fix lychee fragment option syntax
kkraus14 16d62c4
Check deployed docs preview links
kkraus14 0a43789
Fix rendered docs linkcheck failures
kkraus14 ae2cff2
Split rendered docs link check workflow
kkraus14 02cd4d6
Check rendered docs links locally
kkraus14 e8bca70
Clarify rendered docs artifact uploads
kkraus14 40469f4
Handle rendered docs linkcheck exclusions
kkraus14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| name: "CI: Check rendered docs links" | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| docs-artifact: | ||
| description: "Artifact containing the rendered docs HTML tree" | ||
| required: false | ||
| default: docs-rendered-html | ||
| type: string | ||
|
|
||
| jobs: | ||
| check: | ||
| name: Check rendered docs links | ||
| if: ${{ github.repository_owner == 'nvidia' && startsWith(github.ref_name, 'pull-request/') }} | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| pull-requests: read | ||
| defaults: | ||
| run: | ||
| shell: bash -el {0} | ||
| steps: | ||
| - name: Extract PR number | ||
| run: | | ||
| PR_NUMBER="${GITHUB_REF_NAME#pull-request/}" | ||
| if [[ ! "${PR_NUMBER}" =~ ^[0-9]+$ ]]; then | ||
| echo "error: cannot extract PR number from ref ${GITHUB_REF_NAME}" >&2 | ||
| exit 1 | ||
| fi | ||
| echo "PR_NUMBER=${PR_NUMBER}" >> "${GITHUB_ENV}" | ||
|
|
||
| - name: Download rendered docs | ||
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | ||
| with: | ||
| name: ${{ inputs.docs-artifact }} | ||
| path: rendered-docs | ||
|
|
||
| - name: Write rendered docs file list | ||
| run: | | ||
| find "${GITHUB_WORKSPACE}/rendered-docs" -type f -name '*.html' ! -path '*/_static/*' \ | ||
| | LC_ALL=C sort > lychee-rendered-html-files.txt | ||
| if [[ ! -s lychee-rendered-html-files.txt ]]; then | ||
| echo "error: no rendered HTML pages found for lychee" >&2 | ||
| exit 1 | ||
| fi | ||
| wc -l lychee-rendered-html-files.txt | ||
|
|
||
| - name: Restore lychee cache | ||
| id: restore-lychee-cache | ||
| uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | ||
| with: | ||
| path: .lycheecache | ||
| key: docs-rendered-lychee-${{ env.PR_NUMBER }}-${{ github.sha }} | ||
| restore-keys: | | ||
| docs-rendered-lychee-${{ env.PR_NUMBER }}- | ||
|
|
||
| - name: Check rendered docs links | ||
| uses: lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # unreleased: supports v0.24.x archive layout | ||
| with: | ||
| # PR-preview canonical URLs are checked by the preview deployment workflow. | ||
| # The cuda-bindings #id links are docutils "problematic" anchors from generated API docs. | ||
| # Preferred Networks rejects hosted-runner GETs, but the URL is browser reachable. | ||
| args: >- | ||
| --files-from ${{ github.workspace }}/lychee-rendered-html-files.txt | ||
| --include-fragments=full | ||
| --cache | ||
| --max-cache-age 1d | ||
| --max-concurrency 16 | ||
| --host-concurrency 2 | ||
| --host-request-interval 250ms | ||
| --max-retries 3 | ||
| --retry-wait-time 5 | ||
| --timeout 30 | ||
| --no-progress | ||
| --exclude '^https://nvidia\.github\.io/cuda-python/pr-preview/pr-[0-9]+/' | ||
| --exclude '^file://.*/cuda-bindings/latest/module/(driver|runtime)\.html#id[0-9]+$' | ||
| --exclude '^https://www\.preferred\.jp/en/?$' | ||
| fail: true | ||
| failIfEmpty: true | ||
| format: markdown | ||
| jobSummary: false | ||
| lycheeVersion: v0.24.2 | ||
| output: lychee-rendered-html.md | ||
| token: ${{ github.token }} | ||
|
|
||
| - name: Save lychee cache | ||
| if: ${{ always() && steps.restore-lychee-cache.outputs.cache-hit != 'true' && steps.restore-lychee-cache.outputs.cache-primary-key != '' }} | ||
| uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | ||
| with: | ||
| path: .lycheecache | ||
| key: ${{ steps.restore-lychee-cache.outputs.cache-primary-key }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ __pycache__/ | |
|
|
||
| # CUDA Python specific | ||
| .cache/ | ||
| .lycheecache | ||
| .pytest_cache/ | ||
| .benchmarks/ | ||
| *.cpp | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.