Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
71 changes: 71 additions & 0 deletions .github/workflows/ci-status.yml
Original file line number Diff line number Diff line change
@@ -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}"
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# CUDA Rust

[![cuda-oxide CI](https://img.shields.io/github/actions/workflow/status/NVIDIA/cuda-rust/ci.yml?branch=main&event=push&style=flat-square&logo=github-actions&logoColor=white&label=cuda-oxide%20CI)](https://github.com/NVIDIA/cuda-rust/actions/workflows/ci.yml)
[![cutile-rs CI](https://img.shields.io/github/actions/workflow/status/NVIDIA/cuda-rust/cutile-rs.yml?branch=main&event=push&style=flat-square&logo=github-actions&logoColor=white&label=cutile-rs%20CI)](https://github.com/NVIDIA/cuda-rust/actions/workflows/cutile-rs.yml)
[![docs](https://img.shields.io/badge/docs-nvidia.github.io%2Fcuda--rust-blue?style=flat-square)](https://nvidia.github.io/cuda-rust/)
<p align="center">
<a href="https://github.com/NVIDIA/cuda-rust/actions/workflows/ci-status.yml"><img alt="Build" src="https://img.shields.io/github/actions/workflow/status/NVIDIA/cuda-rust/ci-status.yml?label=build"></a>
<a href="https://nvidia.github.io/cuda-rust/"><img alt="Docs" src="https://img.shields.io/badge/docs-latest-blue.svg"></a>
</p>

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
Expand Down
Loading