From 9135367cee865c41f3e6f3df3ff099ea96b19bbd Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Sun, 15 Sep 2024 22:35:51 +0200 Subject: [PATCH] chore: run the tests --- .github/workflows/ci.yml | 48 +++++++--------------------------------- 1 file changed, 8 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 803d3443..d9ab4b5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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