Skip to content

Commit

Permalink
chore: run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vmx committed Sep 15, 2024
1 parent f80ed5f commit 9135367
Showing 1 changed file with 8 additions and 40 deletions.
48 changes: 8 additions & 40 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ env:
# Faster crates.io index checkout.
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
RUST_LOG: debug
# Build the kernel only for the single architecture . This should reduce
# the overall compile-time significantly.
EC_GPU_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75

jobs:
check_clippy:
runs-on: ubuntu-24.04
name: Clippy
env:
# Build the kernel only for the single architecture . This should reduce
# the overall compile-time significantly.
EC_GPU_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
steps:
- uses: actions/checkout@v4
- name: Install required packages
Expand All @@ -40,45 +39,14 @@ jobs:
- name: Run cargo fmt
run: cargo fmt --all -- --check

build_gpu:
test:
runs-on: ubuntu-24.04
name: Build
env:
RUST_LOG: trace
# Build the kernel only for the single architecture . This should reduce
# the overall compile-time significantly.
EC_GPU_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
name: Test
steps:
- uses: actions/checkout@v4
- name: Install required packages
run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
## Run clippy as apart of the test job as it also needs the nvidia toolkit
## in order to compile
#- name: Run Clippy
# run: cargo clippy --workspace -- -D warnings
- name: Build it
run: cargo build --verbose

test_gpu:
runs-on: ubuntu-24.04
name: Test on GPUs
env:
RUST_LOG: trace
# Build the kernel only for the single architecture . This should reduce
# the overall compile-time significantly.
EC_GPU_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
steps:
- uses: actions/checkout@v4
- name: Install required packages
run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
# Run clippy as apart of the test job as it also needs the nvidia toolkit
# in order to compile
- name: Run Clippy
run: cargo clippy --workspace -- -D warnings
# In case no GPUs are available, it's using the CPU fallback.
- name: Test with CUDA
run: cargo test --verbose

Expand Down

0 comments on commit 9135367

Please sign in to comment.