Skip to content

refactor(cuda-core): share host handles and allocations across Tile and SIMT #1963

refactor(cuda-core): share host handles and allocations across Tile and SIMT

refactor(cuda-core): share host handles and allocations across Tile and SIMT #1963

Workflow file for this run

name: Deploy CUDA Rust Docs
# Path-filtered lane: only documentation sources can change what this builds.
on:
push:
branches: [main]
paths:
- 'cuda-oxide/cuda-oxide-book/**'
- 'cutile-rs/cutile-book/**'
- 'cutile-rs/scripts/build_versioned_book.sh'
- 'docs/**'
- '.github/workflows/book.yml'
# Validate the book on PRs too. The build job alone runs there; `deploy` is
# gated below, so a pull request never publishes. Without this the book was
# only ever built after merge, so a PR that broke it could not be caught by
# review or by CI.
pull_request:
# Include PRs stacked on copy-pr-bot mirrors of their prerequisites.
branches: [main, "pull-request/[0-9]+"]
paths:
- 'cuda-oxide/cuda-oxide-book/**'
- 'cutile-rs/cutile-book/**'
- 'cutile-rs/scripts/build_versioned_book.sh'
- 'docs/**'
- '.github/workflows/book.yml'
workflow_dispatch:
# Only checkout rights by default. The Pages deployment permissions live on
# the deploy job alone, so the build job, which is what pull requests run,
# never holds a write token.
permissions:
contents: read
# Serialising every run under one `pages` group is a deploy constraint, and
# applying it workflow-wide would queue unrelated PR builds behind each other.
# Scope this to the ref, and keep the single-deploy guarantee on the deploy job
# itself. Superseded PR runs are cancelled; pushes to main are not, so a
# publish in flight is never interrupted.
# The group deliberately has no commit SHA. Parallel builds on main would let
# a slower older commit deploy after a newer one and replace the published site.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
runs-on: ubuntu-latest
# An umbrella page plus two Sphinx books. Bound the job so a
# wedged install or a sphinx that never returns fails instead of burning to
# the 6-hour default.
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
# cutile-rs versioned docs check out historical `cutile-rs/v*` tags
# via git worktrees; a shallow clone is not enough for that.
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
# One install covers both books; keep cutile-rs/cutile-book/requirements.txt
# in sync with cuda-oxide/cuda-oxide-book/requirements.txt for local `make setup`.
cache-dependency-path: |
cuda-oxide/cuda-oxide-book/requirements.txt
cutile-rs/cutile-book/requirements.txt
- name: Install dependencies
run: pip install -r cuda-oxide/cuda-oxide-book/requirements.txt
# Build the landing page and both books into one Pages artifact. The
# script applies -W --keep-going to current docs and preserves the
# Tile version switcher and historical tags on main.
- name: Build CUDA Rust documentation
run: |
# Unset CUTILE_DOCS_TAGS → build every tag matching the pattern.
# Empty CUTILE_DOCS_TAGS → current tree only (fast PR check).
if [ "${{ github.event_name }}" = "pull_request" ]; then
export CUTILE_DOCS_TAGS=""
fi
bash docs/build_all_docs.sh
# Only `deploy` consumes this, and `deploy` is skipped on pull requests,
# so uploading it there produces an artifact nothing can ever read. A PR's
# job is to prove both Sphinx builds succeed, which the steps above already
# did; gate the upload on the same condition `deploy` uses so the two
# cannot drift apart.
- if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html
deploy:
needs: build
# Publishing is for main only. A pull request builds the book to prove it
# is sound and stops there; it never touches the Pages environment or
# holds the deployment permissions below.
if: github.event_name != 'pull_request'
permissions:
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
runs-on: ubuntu-latest
# One deploy-pages action. It waits on the Pages API, which is exactly the
# kind of step worth bounding rather than leaving to the 6-hour default.
timeout-minutes: 10
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4