Skip to content

Commit 4377830

Browse files
committed
Expand CI coverage.
For `cargo test`, use an exclusion approach instead of an inclusion approach, to increase coverage. For `cargo {build,clippy,doc}`, include the examples on Windows CI. (`cargo build` doesn't work for `vecadd` due to a `nanorand` linking problem, but everything else works.)
1 parent 9bc2a74 commit 4377830

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

.github/workflows/ci_linux.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,24 +158,24 @@ jobs:
158158
cargo clippy
159159
'
160160
161-
# Very limited testing because we can only run tests that don't rely on having a CUDA GPU.
161+
# Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust.
162162
- name: Test
163163
run: |
164164
docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail
165165
export RUSTFLAGS=-Dwarnings
166-
cargo test \
167-
-p cuda_std \
168-
-p gpu_rand \
169-
-p nvvm \
170-
-p rustc_codegen_nvvm
166+
cargo test --workspace \
167+
--exclude blastoff \
168+
--exclude cudnn \
169+
--exclude cust
171170
'
172171
172+
# Exclude cust_raw because it triggers hundreds of warnings.
173173
- name: Check documentation
174174
run: |
175175
docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail
176176
export RUSTDOCFLAGS=-Dwarnings
177177
cargo doc --workspace --all-features --document-private-items --no-deps \
178-
--exclude "cust_raw"
178+
--exclude cust_raw
179179
'
180180
181181
- name: Normalize build artifacts ownership

.github/workflows/ci_windows.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,22 +88,29 @@ jobs:
8888
- name: Build all bindings
8989
run: cargo build --all-features -p cust_raw
9090

91+
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
92+
# Exclude vecadd because of a link error involving nanorand and `SystemFunction036` (a.k.a.
93+
# `RtlGenRandom`).
9194
- name: Build workspace
92-
run: cargo build --workspace --exclude "cudnn*" --exclude "gemm*" --exclude "i128*" --exclude "sha2*" --exclude "vecadd*"
95+
run: cargo build --workspace --exclude cudnn --exclude cudnn-sys --exclude "vecadd*"
9396

97+
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
9498
- name: Clippy
9599
env:
96100
RUSTFLAGS: -Dwarnings
97-
run: cargo clippy --workspace --exclude "cudnn*" --exclude "gemm*" --exclude "i128*" --exclude "sha2*" --exclude "vecadd*"
101+
run: cargo clippy --workspace --exclude cudnn --exclude cudnn-sys
98102

99-
# Very limited testing because we can only run tests that don't rely on having a CUDA GPU.
103+
# Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust.
104+
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
100105
- name: Test
101-
run: cargo test -p cuda_std -p gpu_rand -p nvvm -p rustc_codegen_nvvm
106+
run: cargo test --workspace --exclude blastoff --exclude cudnn --exclude cudnn-sys --exclude cust
102107

108+
# Exclude crates that require cuDNN, not available on Windows CI: cudnn, cudnn-sys.
109+
# Exclude cust_raw because it triggers hundreds of warnings.
103110
- name: Check documentation
104111
env:
105112
RUSTDOCFLAGS: -Dwarnings
106-
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "cudnn*" --exclude "cust_raw" --exclude "gemm*" --exclude "i128*" --exclude "sha2*" --exclude "vecadd*"
113+
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude cudnn --exclude cudnn-sys --exclude cust_raw
107114

108115
# Disabled due to dll issues, someone with Windows knowledge needed
109116
# - name: Compiletest

0 commit comments

Comments
 (0)