-
Notifications
You must be signed in to change notification settings - Fork 230
137 lines (119 loc) · 4.1 KB
/
ci_windows.yml
File metadata and controls
137 lines (119 loc) · 4.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: CI on Windows
on:
pull_request:
paths-ignore:
- "**.md"
push:
branches:
- main
paths-ignore:
- "**.md"
env:
RUST_LOG: info
RUST_BACKTRACE: 1
jobs:
build:
name: Build / ${{ matrix.os }} / CUDA-${{ matrix.cuda }}
runs-on: ${{ matrix.os }}
env:
LLVM_LINK_STATIC: 1
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
cuda: "12.8.1"
nvvm-dll-dir: "nvvm\\bin"
sub-packages:
[
"cublas",
"cublas_dev",
"cuda_profiler_api",
"cudart",
"curand",
"curand_dev",
"nvcc",
"nvrtc",
"nvrtc_dev",
]
- os: windows-latest
target: x86_64-pc-windows-msvc
cuda: "13.0.2"
nvvm-dll-dir: "nvvm\\bin\\x64"
sub-packages:
[
"crt", # new subpackage in CUDA 13
"cublas",
"cublas_dev",
"cuda_profiler_api",
"cudart",
"curand",
"curand_dev",
"nvcc",
"nvptxcompiler", # new subpackage in CUDA 13
"nvrtc",
"nvrtc_dev",
"nvvm", # new subpackage in CUDA 13
]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install CUDA
uses: Jimver/cuda-toolkit@v0.2.29
id: cuda-toolkit
with:
cuda: ${{ matrix.cuda }}
method: network
use-local-cache: false
sub-packages: ${{ toJson(matrix.sub-packages) }}
log-file-suffix: "${{matrix.os}}-${{matrix.cuda}}"
- name: List CUDA_PATH files
run: Get-ChildItem -Path $env:CUDA_PATH -Recurse | ForEach-Object { $_.FullName }
# random command that forces rustup to install stuff in rust-toolchain
- name: Install rust-toolchain
run: cargo version
- name: Add rustup components
run: rustup component add rustfmt clippy
- name: Update PATH to expose CUDA codegen backend
run: |
echo "$env:CUDA_PATH\\${{matrix.nvvm-dll-dir}}" | `
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Verify CUDA, Rust installation
run: |
nvcc --version
rustup show
- name: Load Rust Cache
uses: Swatinem/rust-cache@v2.7.7
with:
key: ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.cuda }}
- name: Rustfmt
run: cargo fmt --all -- --check
- name: Build all bindings
run: cargo build --all-features -p cust_raw
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
- name: Build workspace
run: cargo build --workspace --exclude cudnn --exclude cudnn-sys
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
- name: Clippy
env:
RUSTFLAGS: -Dwarnings
run: cargo clippy --workspace --exclude cudnn --exclude cudnn-sys
# Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust.
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
- name: Test
run: |
cargo test --workspace `
--exclude blastoff --exclude cudnn --exclude cudnn-sys --exclude cust
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
- name: Check documentation
env:
RUSTDOCFLAGS: -Dwarnings
run: |
cargo doc --workspace --all-features --document-private-items --no-deps `
--exclude cudnn --exclude cudnn-sys
# Disabled due to dll issues, someone with Windows knowledge needed
# - name: Compiletest
# run: |
# cargo run -p compiletests --release --no-default-features `
# -- --target-arch compute_61,compute_75,compute_90