mirror of
https://github.com/Rust-GPU/Rust-CUDA.git
synced 2026-06-01 05:39:48 +09:00
When linking `libnvvm.so.4` into `librustc_codegen_nvvm.so` shared library via the `cust_raw` package, we specified the following parameters in the `build.rs`: - cargo::rustc-link-search=native=xxx - cargo::rustc-link-lib=dylib=nvvm According to the [Cargo documentation](https://doc.rust-lang.org/cargo/reference/build-scripts.html#rustc-link-search), the path we added to the `rustc-link-search` parameter is not further populated to the `LD_LIBRARY_PATH` for search by the transitive dependencies. > These paths are also added to the dynamic library search path > environment variable if they are within the OUT_DIR. The behavior is intended to be limited to the OUT_DIR so the `libnvvm.so.4`, which lives as a part of the CUDA SDK, is excluded. Therefore, we must add it to the LD_LIBRARY_PATH manually in our container build stage.
54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
name: CI on Linux
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
push:
|
|
paths-ignore:
|
|
- "**.md"
|
|
env:
|
|
RUST_LOG: info
|
|
RUST_BACKTRACE: 1
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.variance.name }}
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ${{ matrix.variance.image }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
variance:
|
|
# - name: Ubuntu-22.04/CUDA-11.8.0
|
|
# image: "ghcr.io/rust-gpu/rust-cuda-ubuntu22-cuda11:latest"
|
|
- name: Ubuntu-22.04/CUDA-12.8.1
|
|
image: "ghcr.io/rust-gpu/rust-cuda-ubuntu22-cuda12:latest"
|
|
- name: Ubuntu-24.04/CUDA-12.8.1
|
|
image: "ghcr.io/rust-gpu/rust-cuda-ubuntu24-cuda12:latest"
|
|
- name: RockyLinux-9/CUDA-12.8.1
|
|
image: "ghcr.io/rust-gpu/rust-cuda-rockylinux9-cuda12:latest"
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
- name: Verify CUDA, Rust installation
|
|
run: |
|
|
nvcc --version
|
|
rustup show
|
|
- name: Load Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
key: ${{ matrix.variance.name }}
|
|
- 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
|
|
run: cargo build --workspace --exclude "optix*" --exclude "path_tracer" --exclude "denoiser" --exclude "ex*" --exclude "cudnn*"
|
|
- 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"
|