Skip to content

Commit 731bc63

Browse files
committed
Make Windows CI more similar to Linux CI.
Because inconsistencies without a clear reason are confusing. Specifically: - Use `v4` of `actions/checkout`. - Add rustfmt and clippy checks (and fix a couple of clippy warnings). - Exclude fewer things from the build and docs steps.
1 parent fd0fe05 commit 731bc63

File tree

3 files changed

+23
-7
lines changed

3 files changed

+23
-7
lines changed

.github/workflows/ci_linux.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ jobs:
7272
run: |
7373
nvcc --version
7474
rustup show
75+
7576
- name: Load Rust cache
7677
uses: Swatinem/rust-cache@v2
7778
with:
@@ -91,6 +92,10 @@ jobs:
9192
RUSTFLAGS: -Dwarnings
9293
run: cargo clippy --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*"
9394

95+
# Don't currently test because many tests rely on the system having a CUDA GPU
96+
# - name: Test
97+
# run: cargo test --workspace
98+
9499
- name: Check documentation
95100
env:
96101
RUSTDOCFLAGS: -Dwarnings

.github/workflows/ci_windows.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343

4444
steps:
4545
- name: Checkout repository
46-
uses: actions/checkout@v2
46+
uses: actions/checkout@v4
4747

4848
- name: Install CUDA
4949
uses: Jimver/[email protected]
@@ -56,9 +56,6 @@ jobs:
5656
sub-packages: ${{ toJson(matrix.sub-packages) }}
5757
log-file-suffix: "${{matrix.os}}-${{matrix.cuda}}"
5858

59-
- name: Verify CUDA installation
60-
run: nvcc --version
61-
6259
- name: List CUDA_PATH files
6360
shell: pwsh
6461
run: Get-ChildItem -Path $env:CUDA_PATH -Recurse | ForEach-Object { $_.FullName }
@@ -70,17 +67,30 @@ jobs:
7067
- name: Add rustup components
7168
run: rustup component add rustfmt clippy
7269

70+
- name: Verify CUDA, Rust installation
71+
run: |
72+
nvcc --version
73+
rustup show
74+
7375
- name: Load Rust Cache
7476
uses: Swatinem/[email protected]
7577
with:
7678
key: ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.cuda }}
7779

80+
- name: Rustfmt
81+
run: cargo fmt --all -- --check
82+
7883
- name: Build all bindings
7984
run: cargo build --all-features -p cust_raw
8085

81-
- name: Build
86+
- name: Build workspace
8287
run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*"
8388

89+
- name: Clippy
90+
env:
91+
RUSTFLAGS: -Dwarnings
92+
run: cargo clippy --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*"
93+
8494
# Don't currently test because many tests rely on the system having a CUDA GPU
8595
# - name: Test
8696
# run: cargo test --workspace
@@ -89,6 +99,7 @@ jobs:
8999
env:
90100
RUSTDOCFLAGS: -Dwarnings
91101
run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*" --exclude "cust_raw"
102+
92103
# Disabled due to dll issues, someone with Windows knowledge needed
93104
# - name: Compiletest
94105
# run: cargo run -p compiletests --release --no-default-features -- --target-arch compute_61,compute_70,compute_90

tests/compiletests/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ fn find_rustc_codegen_nvvm(workspace_root: &Path) -> PathBuf {
531531
// On Windows, ensure the directory containing the DLL is in PATH
532532
// so that its dependencies can be found
533533
#[cfg(windows)]
534-
setup_windows_dll_path(&path);
534+
setup_windows_dll_path(path);
535535

536536
return path.clone();
537537
}
@@ -554,7 +554,7 @@ fn find_rustc_codegen_nvvm(workspace_root: &Path) -> PathBuf {
554554
if path.is_file() {
555555
// On Windows, ensure the directory containing the DLL is in PATH
556556
#[cfg(windows)]
557-
setup_windows_dll_path(&path);
557+
setup_windows_dll_path(path);
558558

559559
return path.clone();
560560
}

0 commit comments

Comments
 (0)