Skip to content

Commit 8633610

Browse files
Copilotleofang
andcommitted
Fix SVG arrow styling, move footnote to bottom, and add Mermaid diagram
Co-authored-by: leofang <5534781+leofang@users.noreply.github.com>
1 parent a6cd1cf commit 8633610

3 files changed

Lines changed: 162 additions & 6 deletions

File tree

CONTRIBUTING.md

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ By making a contribution to this project, I certify that:
8989

9090
---
9191

92-
<a id="footnote1">1</a>: `cuda.bindings` follows the contributing guidelines from this repository (`cuda-python`).
93-
94-
9592
## CI infrastructure overview
9693

9794
The CUDA Python project uses a comprehensive CI pipeline that builds, tests, and releases multiple components across different platforms. This section provides a visual overview of our CI infrastructure to help contributors understand the build and release process.
@@ -100,6 +97,85 @@ The CUDA Python project uses a comprehensive CI pipeline that builds, tests, and
10097

10198
![CUDA Python CI Pipeline Flow](ci/ci-pipeline.svg)
10299

100+
Alternative Mermaid diagram representation:
101+
102+
```mermaid
103+
flowchart TD
104+
%% Trigger Events
105+
subgraph TRIGGER["🔄 TRIGGER EVENTS"]
106+
T1["• Push to main branch<br/>• Push to pull-request/* branches"]
107+
T2["• Pull request<br/>• Manual workflow dispatch"]
108+
T1 --- T2
109+
end
110+
111+
%% Build Stage
112+
subgraph BUILD["🔨 BUILD STAGE"]
113+
subgraph BUILD_PLATFORMS["Parallel Platform Builds"]
114+
B1["linux-64<br/>(Self-hosted)"]
115+
B2["linux-aarch64<br/>(Self-hosted)"]
116+
B3["win-64<br/>(GitHub-hosted)"]
117+
end
118+
BUILD_DETAILS["• Python versions: 3.9, 3.10, 3.11, 3.12, 3.13<br/>• CUDA version: 13.0.0 (build-time)<br/>• Components: cuda-core, cuda-bindings,<br/> cuda-pathfinder, cuda-python"]
119+
end
120+
121+
%% Artifact Storage
122+
subgraph ARTIFACTS["📦 ARTIFACT STORAGE"]
123+
subgraph GITHUB_ARTIFACTS["GitHub Artifacts"]
124+
GA1["• Wheel files (.whl)<br/>• Test artifacts<br/>• Documentation<br/>(30-day retention)"]
125+
end
126+
subgraph GITHUB_CACHE["GitHub Cache"]
127+
GC1["• Mini CTK cache"]
128+
end
129+
end
130+
131+
%% Test Stage
132+
subgraph TEST["🧪 TEST STAGE"]
133+
subgraph TEST_PLATFORMS["Parallel Platform Tests"]
134+
TS1["linux-64<br/>(Self-hosted)"]
135+
TS2["linux-aarch64<br/>(Self-hosted)"]
136+
TS3["win-64<br/>(GitHub-hosted)"]
137+
end
138+
TEST_DETAILS["• Download wheels from artifacts<br/>• Test against multiple CUDA runtime versions<br/>• Run Python unit tests, Cython tests, examples"]
139+
ARTIFACT_FLOWS["Artifact Flows:<br/>• cuda-pathfinder: main → backport<br/>• cuda-bindings: backport → main"]
140+
end
141+
142+
%% Release Pipeline
143+
subgraph RELEASE["🚀 RELEASE PIPELINE"]
144+
subgraph RELEASE_STAGES["Sequential Release Steps"]
145+
R1["Validation<br/>• Artifact integrity<br/>• Git tag verification"]
146+
R2["Publishing<br/>• PyPI/TestPyPI<br/>• Component or all releases"]
147+
R3["Documentation<br/>• GitHub Pages<br/>• Release notes"]
148+
R1 --> R2 --> R3
149+
end
150+
RELEASE_DETAILS["• Manual workflow dispatch with run ID<br/>• Supports individual component or full releases"]
151+
end
152+
153+
%% Main Flow
154+
TRIGGER --> BUILD
155+
BUILD --> ARTIFACTS
156+
ARTIFACTS --> TEST
157+
TEST --> RELEASE
158+
159+
%% Artifact Flow Arrows (Cache Reuse)
160+
GITHUB_CACHE -.->|"mini CTK reuse"| BUILD
161+
162+
%% Artifact Flow Arrows (Wheel Fetch)
163+
GITHUB_ARTIFACTS -.->|"wheel fetch"| RELEASE
164+
165+
%% Styling
166+
classDef triggerStyle fill:#e8f4fd,stroke:#2196F3,stroke-width:2px,color:#1976D2
167+
classDef buildStyle fill:#f3e5f5,stroke:#9C27B0,stroke-width:2px,color:#7B1FA2
168+
classDef artifactStyle fill:#fff3e0,stroke:#FF9800,stroke-width:2px,color:#F57C00
169+
classDef testStyle fill:#e8f5e8,stroke:#4CAF50,stroke-width:2px,color:#388E3C
170+
classDef releaseStyle fill:#ffebee,stroke:#f44336,stroke-width:2px,color:#D32F2F
171+
172+
class TRIGGER,T1,T2 triggerStyle
173+
class BUILD,BUILD_PLATFORMS,B1,B2,B3,BUILD_DETAILS buildStyle
174+
class ARTIFACTS,GITHUB_ARTIFACTS,GITHUB_CACHE,GA1,GC1 artifactStyle
175+
class TEST,TEST_PLATFORMS,TS1,TS2,TS3,TEST_DETAILS,ARTIFACT_FLOWS testStyle
176+
class RELEASE,RELEASE_STAGES,R1,R2,R3,RELEASE_DETAILS releaseStyle
177+
```
178+
103179
### Pipeline Execution Details
104180

105181
**Parallel Execution**: The CI pipeline leverages parallel execution to optimize build and test times:
@@ -130,3 +206,7 @@ The CUDA Python project uses a comprehensive CI pipeline that builds, tests, and
130206
- **Security**: All commits must be signed, untrusted code blocked
131207
- **Parallel execution**: Matrix builds across Python versions and platforms
132208
- **Component isolation**: Each component (core, bindings, pathfinder, python) can be built/released independently
209+
210+
---
211+
212+
<a id="footnote1">1</a>: `cuda.bindings` follows the contributing guidelines from this repository (`cuda-python`).

ci/ci-pipeline.mmd

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
```mermaid
2+
flowchart TD
3+
%% Trigger Events
4+
subgraph TRIGGER["🔄 TRIGGER EVENTS"]
5+
T1["• Push to main branch<br/>• Push to pull-request/* branches"]
6+
T2["• Pull request<br/>• Manual workflow dispatch"]
7+
T1 --- T2
8+
end
9+
10+
%% Build Stage
11+
subgraph BUILD["🔨 BUILD STAGE"]
12+
subgraph BUILD_PLATFORMS["Parallel Platform Builds"]
13+
B1["linux-64<br/>(Self-hosted)"]
14+
B2["linux-aarch64<br/>(Self-hosted)"]
15+
B3["win-64<br/>(GitHub-hosted)"]
16+
end
17+
BUILD_DETAILS["• Python versions: 3.9, 3.10, 3.11, 3.12, 3.13<br/>• CUDA version: 13.0.0 (build-time)<br/>• Components: cuda-core, cuda-bindings,<br/> cuda-pathfinder, cuda-python"]
18+
end
19+
20+
%% Artifact Storage
21+
subgraph ARTIFACTS["📦 ARTIFACT STORAGE"]
22+
subgraph GITHUB_ARTIFACTS["GitHub Artifacts"]
23+
GA1["• Wheel files (.whl)<br/>• Test artifacts<br/>• Documentation<br/>(30-day retention)"]
24+
end
25+
subgraph GITHUB_CACHE["GitHub Cache"]
26+
GC1["• Mini CTK cache"]
27+
end
28+
end
29+
30+
%% Test Stage
31+
subgraph TEST["🧪 TEST STAGE"]
32+
subgraph TEST_PLATFORMS["Parallel Platform Tests"]
33+
TS1["linux-64<br/>(Self-hosted)"]
34+
TS2["linux-aarch64<br/>(Self-hosted)"]
35+
TS3["win-64<br/>(GitHub-hosted)"]
36+
end
37+
TEST_DETAILS["• Download wheels from artifacts<br/>• Test against multiple CUDA runtime versions<br/>• Run Python unit tests, Cython tests, examples"]
38+
ARTIFACT_FLOWS["Artifact Flows:<br/>• cuda-pathfinder: main → backport<br/>• cuda-bindings: backport → main"]
39+
end
40+
41+
%% Release Pipeline
42+
subgraph RELEASE["🚀 RELEASE PIPELINE"]
43+
subgraph RELEASE_STAGES["Sequential Release Steps"]
44+
R1["Validation<br/>• Artifact integrity<br/>• Git tag verification"]
45+
R2["Publishing<br/>• PyPI/TestPyPI<br/>• Component or all releases"]
46+
R3["Documentation<br/>• GitHub Pages<br/>• Release notes"]
47+
R1 --> R2 --> R3
48+
end
49+
RELEASE_DETAILS["• Manual workflow dispatch with run ID<br/>• Supports individual component or full releases"]
50+
end
51+
52+
%% Main Flow
53+
TRIGGER --> BUILD
54+
BUILD --> ARTIFACTS
55+
ARTIFACTS --> TEST
56+
TEST --> RELEASE
57+
58+
%% Artifact Flow Arrows (Cache Reuse)
59+
GITHUB_CACHE -.->|"mini CTK reuse"| BUILD
60+
61+
%% Artifact Flow Arrows (Wheel Fetch)
62+
GITHUB_ARTIFACTS -.->|"wheel fetch"| RELEASE
63+
64+
%% Styling
65+
classDef triggerStyle fill:#e8f4fd,stroke:#2196F3,stroke-width:2px,color:#1976D2
66+
classDef buildStyle fill:#f3e5f5,stroke:#9C27B0,stroke-width:2px,color:#7B1FA2
67+
classDef artifactStyle fill:#fff3e0,stroke:#FF9800,stroke-width:2px,color:#F57C00
68+
classDef testStyle fill:#e8f5e8,stroke:#4CAF50,stroke-width:2px,color:#388E3C
69+
classDef releaseStyle fill:#ffebee,stroke:#f44336,stroke-width:2px,color:#D32F2F
70+
71+
class TRIGGER,T1,T2 triggerStyle
72+
class BUILD,BUILD_PLATFORMS,B1,B2,B3,BUILD_DETAILS buildStyle
73+
class ARTIFACTS,GITHUB_ARTIFACTS,GITHUB_CACHE,GA1,GC1 artifactStyle
74+
class TEST,TEST_PLATFORMS,TS1,TS2,TS3,TEST_DETAILS,ARTIFACT_FLOWS testStyle
75+
class RELEASE,RELEASE_STAGES,R1,R2,R3,RELEASE_DETAILS releaseStyle
76+
```

ci/ci-pipeline.svg

Lines changed: 3 additions & 3 deletions
Loading

0 commit comments

Comments
 (0)