Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
deec047
Check versioned docs example links
kkraus14 Jun 1, 2026
8c67216
Add pathfinder docs linkcheck
kkraus14 Jun 1, 2026
bad8f0f
Check docs example links locally
kkraus14 Jun 1, 2026
3c880e6
Add lychee docs link checking
kkraus14 Jun 2, 2026
d6466e9
Skip lychee on pre-commit.ci
kkraus14 Jun 2, 2026
ed50484
Check rendered doc preview links with lychee
kkraus14 Jun 2, 2026
4a90b21
Fix doc preview wait step
kkraus14 Jun 2, 2026
8833364
Use lychee-action default binary
kkraus14 Jun 2, 2026
451cdb1
Address docs review comments
kkraus14 Jun 2, 2026
fbc91e2
Use fixed lychee-action revision
kkraus14 Jun 2, 2026
a1ff984
Fix lychee fragment option syntax
kkraus14 Jun 2, 2026
1bbd30a
Check deployed docs preview links
kkraus14 Jun 2, 2026
14c70d0
Fix rendered docs linkcheck failures
kkraus14 Jun 2, 2026
e7c5bac
Split rendered docs link check workflow
kkraus14 Jun 4, 2026
7f7bfa6
Check rendered docs links locally
kkraus14 Jun 4, 2026
d16f283
Clarify rendered docs artifact uploads
kkraus14 Jun 4, 2026
1ace33e
Handle rendered docs linkcheck exclusions
kkraus14 Jun 4, 2026
d1af887
Defer generated pointer docs cleanup
kkraus14 Jun 6, 2026
809534b
Remove redundant docs commit hash env
kkraus14 Jun 6, 2026
f6adcfb
Note temporary rendered docs link exclusion
kkraus14 Jun 9, 2026
22dde0a
Use lychee release tag for pre-commit hook
kkraus14 Jun 9, 2026
0a319ad
Inline rendered docs link check
kkraus14 Jun 9, 2026
159377e
Fix generated cuda-bindings problematic doc anchors
kkraus14 Jun 9, 2026
6d2c2a9
Escape generated cuda-bindings docstring markers
kkraus14 Jun 9, 2026
d98094f
Escape cuPointerGetAttribute pointer markers
kkraus14 Jun 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 65 additions & 7 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

Expand Down Expand Up @@ -91,15 +91,18 @@ jobs:

if [[ ${{ inputs.is-release }} == "true" ]]; then
FILE_HASH="*"
COMMIT_HASH="${{ inputs.git-tag }}"
DOCS_GITHUB_REF="${{ inputs.git-tag }}"
if [[ -z "${DOCS_GITHUB_REF}" ]]; then
DOCS_GITHUB_REF="${GITHUB_REF_NAME}"
fi
else
FILE_HASH="${{ github.sha }}"
COMMIT_HASH="${{ github.sha }}"
DOCS_GITHUB_REF="${{ github.sha }}"
fi

# make outputs from the previous job as env vars
CUDA_CORE_ARTIFACT_BASENAME="cuda-core-python${PYTHON_VERSION_FORMATTED}-linux-64"
echo "COMMIT_HASH=${COMMIT_HASH}" >> $GITHUB_ENV
echo "CUDA_PYTHON_DOCS_GITHUB_REF=${DOCS_GITHUB_REF}" >> $GITHUB_ENV
echo "CUDA_CORE_ARTIFACT_BASENAME=${CUDA_CORE_ARTIFACT_BASENAME}" >> $GITHUB_ENV
echo "CUDA_CORE_ARTIFACT_NAME=${CUDA_CORE_ARTIFACT_BASENAME}-${FILE_HASH}" >> $GITHUB_ENV
echo "CUDA_CORE_ARTIFACTS_DIR=$(realpath "$REPO_DIR/cuda_core/dist")" >> $GITHUB_ENV
Expand Down Expand Up @@ -242,8 +245,63 @@ jobs:
fi
mv ${COMPONENT}/docs/build/html/* artifacts/docs/${TARGET}

# TODO: Consider removing this step?
- name: Upload doc artifacts
- name: Write rendered docs file list
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
run: |
find "${GITHUB_WORKSPACE}/artifacts/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
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
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
if: ${{ !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') }}
uses: lycheeverse/lychee-action@6da1d14f3a43098a294b7696d93d938aa8d20fc0 # unreleased: supports v0.24.x archive layout
with:
# PR-preview canonical URLs are checked by the preview deployment workflow.
# 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 '^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() && !inputs.is-release && github.ref_name != 'main' && !startsWith(github.ref_name, 'release/') && 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 }}

- name: Upload docs GitHub Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: artifacts/
Expand All @@ -265,5 +323,5 @@ jobs:
git-config-email: cuda-python-bot@users.noreply.github.com
folder: artifacts/docs/
target-folder: docs/
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.COMMIT_HASH }}"
commit-message: "Deploy ${{ (inputs.is-release && 'release') || 'latest' }} docs: ${{ env.CUDA_PYTHON_DOCS_GITHUB_REF }}"
clean: false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/

# CUDA Python specific
.cache/
.lycheecache
.pytest_cache/
.benchmarks/
*.cpp
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ci:
autoupdate_branch: ''
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: quarterly
skip: [lychee]
submodules: false

# Please update the rev: SHAs below with this command:
Expand Down Expand Up @@ -53,6 +54,18 @@ repos:
- stubgen-pyx==0.2.6
- Cython==3.2.4

# Link checking for authored documentation files
- repo: https://github.com/lycheeverse/lychee
rev: 2bba271688c1abb1503097a064e6c3bc1d1b6a9b # frozen: lychee-v0.24.2
hooks:
- id: lychee
args:
- --cache
- --max-concurrency=4
- --max-retries=3
- --no-progress
files: '\.(md|rst)$'

# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "3e8a8703264a2f4a69428a0aa4dcb512790b2c8c" # frozen: v6.0.0
Expand Down
Loading
Loading