Skip to content

Commit 4ddaadd

Browse files
nnethercoteLegNeato
authored andcommitted
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 f8e950c commit 4ddaadd

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
@@ -152,24 +152,24 @@ jobs:
152152
cargo clippy
153153
'
154154
155-
# Very limited testing because we can only run tests that don't rely on having a CUDA GPU.
155+
# Exclude crates with tests that require an NVIDIA GPU: blastoff, cudnn, cust.
156156
- name: Test
157157
run: |
158158
docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail
159159
export RUSTFLAGS=-Dwarnings
160-
cargo test \
161-
-p cuda_std \
162-
-p gpu_rand \
163-
-p nvvm \
164-
-p rustc_codegen_nvvm
160+
cargo test --workspace \
161+
--exclude blastoff \
162+
--exclude cudnn \
163+
--exclude cust
165164
'
166165
166+
# Exclude cust_raw because it triggers hundreds of warnings.
167167
- name: Check documentation
168168
run: |
169169
docker exec "$CONTAINER_NAME" bash -lc 'set -euo pipefail
170170
export RUSTDOCFLAGS=-Dwarnings
171171
cargo doc --workspace --all-features --document-private-items --no-deps \
172-
--exclude "cust_raw"
172+
--exclude cust_raw
173173
'
174174
175175
- 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)