1
1
name : CI
2
2
3
- on : [pull_request, push]
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - master
4
8
5
- # Cancel a job if there's a new on on the same branch started.
9
+ # Cancel a job if there's a new one on the same branch started.
6
10
# Based on https://stackoverflow.com/questions/58895283/stop-already-running-workflow-job-in-github-actions/67223051#67223051
7
11
concurrency :
8
12
group : ${{ github.ref }}
14
18
# Faster crates.io index checkout.
15
19
CARGO_REGISTRIES_CRATES_IO_PROTOCOL : sparse
16
20
RUST_LOG : debug
17
- # Build the kernel only for the single architecture . This should reduce
18
- # the overall compile-time significantly.
21
+ # Build the kernel only for the single architecture. This should reduce the overall compile-time significantly.
19
22
EC_GPU_CUDA_NVCC_ARGS : --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
20
23
BELLMAN_CUDA_NVCC_ARGS : --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
21
24
NEPTUNE_CUDA_NVCC_ARGS : --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
27
30
steps :
28
31
- uses : actions/checkout@v4
29
32
- name : Install required packages
30
- run : sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
33
+ run : |
34
+ sudo apt-get update
35
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
31
36
- name : Install cargo clippy
32
37
run : rustup component add clippy
33
38
- name : Run cargo clippy
@@ -44,13 +49,29 @@ jobs:
44
49
run : cargo fmt --all -- --check
45
50
46
51
test :
47
- runs-on : ubuntu-24.04
52
+ runs-on : ['self-hosted', 'linux', 'x64', '2xlarge+gpu']
48
53
name : Test
49
54
steps :
50
55
- uses : actions/checkout@v4
56
+ # TODO: Move the driver installation to the AMI.
57
+ # https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html
58
+ # https://www.nvidia.com/en-us/drivers/
59
+ - name : Install CUDA drivers
60
+ run : |
61
+ curl -L -o nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb https://us.download.nvidia.com/tesla/570.148.08/nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb
62
+ sudo dpkg -i nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb
63
+ sudo cp /var/nvidia-driver-local-repo-ubuntu2404-570.148.08/nvidia-driver-local-*-keyring.gpg /usr/share/keyrings/
64
+ sudo apt-get update
65
+ sudo apt-get install --no-install-recommends --yes cuda-drivers
66
+ rm nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb
51
67
- name : Install required packages
52
- run : sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
53
- # In case no GPUs are available, it's using the CPU fallback.
68
+ run : |
69
+ sudo apt-get update
70
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
71
+ # TODO: Remove this and other rust installation directives from jobs running
72
+ - uses : dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
73
+ with :
74
+ toolchain : 1.83
54
75
- name : Test
55
76
run : cargo test --verbose
56
77
0 commit comments