From 2941b5bc9d6b4d89f04c97db720f43db3c977882 Mon Sep 17 00:00:00 2001 From: Melih Elibol <1884921+elibol@users.noreply.github.com> Date: Thu, 8 Oct 2026 09:36:11 -0700 Subject: [PATCH 1/4] ci: one status workflow so the README can carry a single CI badge Badges are per workflow file, and the SIMT and Tile pipelines have to stay separate for now: ci.yml runs on GitHub-hosted runners on push and pull_request, while cutile-rs.yml runs on NVIDIA self-hosted runners and can only trigger on push to main and the copy-pr-bot mirror branches. So the README ends up with one badge per pipeline unless something combines them. ci-status.yml runs whenever either pipeline completes on main, finds the newest completed push run of each that actually executed jobs, and fails if that run failed. A run whose jobs were all skipped (the cutile-rs.yml `changes` gate on a non-Tile push) and a cancelled run are skipped over, because taking either at face value would turn the badge green while the last real run was red. The README badge points at this workflow. Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com> --- .github/workflows/ci-status.yml | 71 +++++++++++++++++++++++++++++++++ README.md | 3 +- 2 files changed, 72 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/ci-status.yml diff --git a/.github/workflows/ci-status.yml b/.github/workflows/ci-status.yml new file mode 100644 index 000000000..2c9f44b12 --- /dev/null +++ b/.github/workflows/ci-status.yml @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +--- +name: CI status + +# One status for the whole repository, so the README needs one badge. +# +# Badges are per workflow file, and the two pipelines have to stay separate +# for now: ci.yml (SIMT and the shared host crates) runs on GitHub-hosted +# runners on push and pull_request; cutile-rs.yml (Tile) runs on NVIDIA +# self-hosted runners, which cannot run on pull_request events, so it +# triggers on push to main and to the copy-pr-bot mirror branches. +# +# This workflow runs whenever either of them completes on main. For each +# pipeline it finds the newest completed push run on main that actually +# executed jobs and fails if that run failed. Two kinds of run say nothing +# about the pipeline and are skipped over: a run whose jobs were all skipped +# (cutile-rs.yml's `changes` gate does that on a non-Tile push) and a +# cancelled run. Taking either at face value would turn the badge green while +# the last real run was red. +# +# The badge in README.md points here. To cover another pipeline, add its +# workflow name to the trigger list and its file name to the loop below. +on: + workflow_run: + workflows: [CI, cutile-rs-pr] + types: [completed] + branches: [main] + +permissions: + actions: read + contents: read + +jobs: + status: + name: combined CI status on main + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Report the newest executed main run of each pipeline + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + failed=0 + for workflow in ci.yml cutile-rs.yml; do + verdict=none + url=- + while read -r id conclusion run_url; do + [ -n "${id}" ] || continue + case "${conclusion}" in + success|failure|timed_out) ;; + *) continue ;; + esac + executed="$(gh api "repos/${GITHUB_REPOSITORY}/actions/runs/${id}/jobs?per_page=100" \ + --jq '[.jobs[] | select(.name != "changes" and .conclusion != "skipped")] | length')" + if [ "${executed}" -gt 0 ]; then + verdict="${conclusion}" + url="${run_url}" + break + fi + done < <(gh api \ + "repos/${GITHUB_REPOSITORY}/actions/workflows/${workflow}/runs?branch=main&event=push&status=completed&per_page=10" \ + --jq '.workflow_runs[] | "\(.id) \(.conclusion) \(.html_url)"') + echo "${workflow}: ${verdict} (${url})" + case "${verdict}" in + success|none) ;; + *) failed=1 ;; + esac + done + exit "${failed}" diff --git a/README.md b/README.md index a622a087d..fd6150238 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # CUDA Rust -[](https://github.com/NVIDIA/cuda-rust/actions/workflows/ci.yml) -[](https://github.com/NVIDIA/cuda-rust/actions/workflows/cutile-rs.yml) +[](https://github.com/NVIDIA/cuda-rust/actions/workflows/ci-status.yml) [](https://nvidia.github.io/cuda-rust/) CUDA Rust is NVIDIA's CUDA platform for Rust. It provides From 3d12d0a3226200975f55e87e250ba91bf57b0b42 Mon Sep 17 00:00:00 2001 From: Melih Elibol <1884921+elibol@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:17:13 -0700 Subject: [PATCH 2/4] docs: center the root README badges Same shape as the component READMEs, which open with a centered badge block above a left-aligned heading. Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com> --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd6150238..896b0baa1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # CUDA Rust -[](https://github.com/NVIDIA/cuda-rust/actions/workflows/ci-status.yml) -[](https://nvidia.github.io/cuda-rust/) +
CUDA Rust is NVIDIA's CUDA platform for Rust. It provides host-side crates for working with the CUDA driver and device-side crates and From 9fe1747459f9171a27058a7a9fa60e1939aee409 Mon Sep 17 00:00:00 2001 From: Melih Elibol <1884921+elibol@users.noreply.github.com> Date: Thu, 8 Oct 2026 11:22:25 -0700 Subject: [PATCH 3/4] docs: plain build and docs badges on the root README Same look as the cutile-rs badges: default style, short labels, no logos. Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com> --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 896b0baa1..8381051dd 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # CUDA Rust CUDA Rust is NVIDIA's CUDA platform for Rust. It provides From 3c082886a13425185af5c36ddb2b16553097d831 Mon Sep 17 00:00:00 2001 From: Melih Elibol <1884921+elibol@users.noreply.github.com> Date: Thu, 8 Oct 2026 13:58:56 -0700 Subject: [PATCH 4/4] docs: badge reads docs | latest Signed-off-by: Melih Elibol <1884921+elibol@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8381051dd..ecbfb2d9b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ CUDA Rust is NVIDIA's CUDA platform for Rust. It provides