diff --git a/.github/workflows/ci_linux.yml b/.github/workflows/ci_linux.yml index ad09f1b7..656920c2 100644 --- a/.github/workflows/ci_linux.yml +++ b/.github/workflows/ci_linux.yml @@ -72,6 +72,7 @@ jobs: run: | nvcc --version rustup show + - name: Load Rust cache uses: Swatinem/rust-cache@v2 with: @@ -80,21 +81,25 @@ jobs: - name: Rustfmt run: cargo fmt --all -- --check - - name: Clippy - env: - RUSTFLAGS: -Dwarnings - run: cargo clippy --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*" - - name: Build all bindings run: cargo build --all-features -p cust_raw - name: Build workspace - run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*" + run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex0*" --exclude "cudnn*" + + - name: Clippy + env: + RUSTFLAGS: -Dwarnings + run: cargo clippy --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex0*" --exclude "cudnn*" + + # Don't currently test because many tests rely on the system having a CUDA GPU + # - name: Test + # run: cargo test --workspace - name: Check documentation env: RUSTDOCFLAGS: -Dwarnings - run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*" --exclude "cust_raw" + run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "ex0*" --exclude "cudnn*" --exclude "cust_raw" - name: Prepare artifact details id: artifact_details diff --git a/.github/workflows/ci_windows.yml b/.github/workflows/ci_windows.yml index c166f025..e1e76c9d 100644 --- a/.github/workflows/ci_windows.yml +++ b/.github/workflows/ci_windows.yml @@ -43,7 +43,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install CUDA uses: Jimver/cuda-toolkit@v0.2.22 @@ -56,9 +56,6 @@ jobs: sub-packages: ${{ toJson(matrix.sub-packages) }} log-file-suffix: "${{matrix.os}}-${{matrix.cuda}}" - - name: Verify CUDA installation - run: nvcc --version - - name: List CUDA_PATH files shell: pwsh run: Get-ChildItem -Path $env:CUDA_PATH -Recurse | ForEach-Object { $_.FullName } @@ -70,16 +67,29 @@ jobs: - name: Add rustup components run: rustup component add rustfmt clippy + - 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 - - name: Build - run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex*" --exclude "cudnn*" --exclude "sha2*" + - name: Build workspace + run: cargo build --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex0*" --exclude "cudnn*" --exclude "sha2*" + + - name: Clippy + env: + RUSTFLAGS: -Dwarnings + run: cargo clippy --workspace --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex0*" --exclude "cudnn*" --exclude "sha2*" # Don't currently test because many tests rely on the system having a CUDA GPU # - name: Test @@ -88,7 +98,8 @@ jobs: - name: Check documentation env: RUSTDOCFLAGS: -Dwarnings - 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" + run: cargo doc --workspace --all-features --document-private-items --no-deps --exclude "optix*" --exclude "path-tracer" --exclude "denoiser" --exclude "vecadd*" --exclude "gemm*" --exclude "ex0*" --exclude "cudnn*" --exclude "sha2*" --exclude "cust_raw" + # 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_70,compute_90 diff --git a/tests/compiletests/src/main.rs b/tests/compiletests/src/main.rs index a0c04589..c1cdb206 100644 --- a/tests/compiletests/src/main.rs +++ b/tests/compiletests/src/main.rs @@ -531,7 +531,7 @@ fn find_rustc_codegen_nvvm(workspace_root: &Path) -> PathBuf { // On Windows, ensure the directory containing the DLL is in PATH // so that its dependencies can be found #[cfg(windows)] - setup_windows_dll_path(&path); + setup_windows_dll_path(path); return path.clone(); } @@ -554,7 +554,7 @@ fn find_rustc_codegen_nvvm(workspace_root: &Path) -> PathBuf { if path.is_file() { // On Windows, ensure the directory containing the DLL is in PATH #[cfg(windows)] - setup_windows_dll_path(&path); + setup_windows_dll_path(path); return path.clone(); }