Skip to content

feat(mir-importer): emit host-style { data_ptr, length } DWARF struct… #2067

feat(mir-importer): emit host-style { data_ptr, length } DWARF struct…

feat(mir-importer): emit host-style { data_ptr, length } DWARF struct… #2067

Workflow file for this run

name: Deploy CUDA Rust Docs
# Path-filtered lane: only documentation sources can change what this builds.
# Self-hosted runners reject pull_request. copy-pr-bot mirrors trusted PRs to
# pull-request/<n>, and the build job triggers on that push. `deploy` stays on
# main: a mirror push is a push event, so an event-name check would publish it.
on:
push:
# No workflow-level paths: filter; the changes job below gates the jobs.
branches:
- main
- "pull-request/[0-9]+"
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.ref != 'refs/heads/main' }}
jobs:
# Path gate. copy-pr-bot creates pull-request/<n> at an existing SHA, and
# GitHub often treats that push as having no path changes, so a workflow-level
# `paths:` filter would skip the whole run. This job diffs against main
# instead, as cutile-rs.yml does, and every job below runs when no file diff
# is detected. Other events (schedule, workflow_dispatch) skip the gate.
changes:
if: github.event_name == 'push'
runs-on: linux-amd64-cpu4
timeout-minutes: 5
permissions:
contents: read
outputs:
relevant: ${{ steps.changes.outputs.relevant }}
any_changed: ${{ steps.changes.outputs.any_changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: dorny/paths-filter@0e4a8c6effa4802afeda77dc8d303f8176d7dfad # v3.0.4
id: changes
with:
filters: |
relevant:
- 'cuda-oxide/cuda-oxide-book/**'
- 'cutile-rs/cutile-book/**'
- 'cutile-rs/scripts/build_versioned_book.sh'
- 'docs/**'
- '.github/workflows/book.yml'
# `*` covers a root file, `**` every nested path. Both false means
# no file diff was detected.
any_changed:
- '*'
- '**'
build:
needs: changes
if: ${{ !cancelled() && (github.event_name != 'push' || needs.changes.outputs.relevant == 'true' || needs.changes.outputs.any_changed != 'true') }}
runs-on: linux-amd64-cpu4
# 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).
case "${GITHUB_REF}" in
refs/heads/pull-request/*) export CUTILE_DOCS_TAGS="" ;;
esac
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.ref == 'refs/heads/main'
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.ref == 'refs/heads/main'
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