mirror of
https://github.com/Rust-GPU/Rust-CUDA.git
synced 2026-06-01 05:39:48 +09:00
Added a new workflow, container_images.yml, to automate building and pushing CI container images to GitHub Container Registry, ensuring consistent environments for CI runs across Linux distributions. Added a dedicated CI workflow for Linux to streamline testing across multiple CUDA and OS configurations. It reuses the images built from container_images.yml workflow to avoid installing CUDA toolkits every time to save time. Key changes: - Matrix configurations for Ubuntu 22/24, RockyLinux 9 with CUDA 12.8.1 - Dockerfiles updated with required dependencies (clang, CUDA toolchains, etc.) to support bindgen and build examples. - Removed redundant CI steps from `rust.yml` now handled in `ci_linux.yml`
76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
name: Rust CI
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- "**.md"
|
|
push:
|
|
paths-ignore:
|
|
- "**.md"
|
|
|
|
env:
|
|
RUST_LOG: info
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
rust:
|
|
name: Rust on ${{ matrix.os }} with CUDA ${{ matrix.cuda }}
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
LLVM_LINK_STATIC: 1
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-latest
|
|
target: x86_64-pc-windows-msvc
|
|
cuda: "12.8.1"
|
|
linux-local-args: []
|
|
sub-packages: ["nvcc", "nvrtc", "nvrtc_dev", "cuda_profiler_api", "cudart", "cublas", "cublas_dev", "curand", "curand_dev"]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install CUDA
|
|
uses: Jimver/cuda-toolkit@v0.2.22
|
|
id: cuda-toolkit
|
|
with:
|
|
cuda: ${{ matrix.cuda }}
|
|
method: network
|
|
linux-local-args: ${{ toJson(matrix.linux-local-args) }}
|
|
use-local-cache: false
|
|
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 }
|
|
|
|
# random command that forces rustup to install stuff in rust-toolchain
|
|
- name: Install rust-toolchain
|
|
run: cargo version
|
|
|
|
- name: Add rustup components
|
|
run: rustup component add rustfmt clippy
|
|
|
|
- name: Load Rust Cache
|
|
uses: Swatinem/rust-cache@v2.7.7
|
|
with:
|
|
key: ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.cuda }}
|
|
|
|
- name: Build
|
|
run: cargo build --workspace --exclude "optix*" --exclude "path_tracer" --exclude "denoiser" --exclude "add" --exclude "ex*" --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 "add" --exclude "ex*" --exclude "cudnn*" --exclude "cust_raw"
|