@@ -3,18 +3,18 @@ name: Rust CI
3
3
on :
4
4
pull_request :
5
5
paths-ignore :
6
- - ' **.md'
6
+ - " **.md"
7
7
push :
8
8
paths-ignore :
9
- - ' **.md'
9
+ - " **.md"
10
10
11
11
env :
12
12
RUST_LOG : info
13
13
RUST_BACKTRACE : 1
14
14
15
15
jobs :
16
16
rust :
17
- name : Rust ${{ matrix.rust }} on ${{ matrix.os }}
17
+ name : Rust on ${{ matrix.os }} with CUDA ${{ matrix.cuda }}
18
18
runs-on : ${{ matrix.os }}
19
19
env :
20
20
LLVM_LINK_STATIC : 1
@@ -24,22 +24,39 @@ jobs:
24
24
include :
25
25
- os : ubuntu-20.04
26
26
target : x86_64-unknown-linux-gnu
27
+ cuda : " 11.2.2"
28
+ linux-local-args : ["--toolkit"]
29
+ - os : ubuntu-24.04
30
+ target : x86_64-unknown-linux-gnu
31
+ cuda : " 12.8.1"
32
+ linux-local-args : ["--toolkit"]
33
+ - os : windows-latest
34
+ target : x86_64-pc-windows-msvc
35
+ cuda : " 11.2.2"
36
+ linux-local-args : []
27
37
- os : windows-latest
28
38
target : x86_64-pc-windows-msvc
39
+ cuda : " 12.8.1"
40
+ linux-local-args : []
41
+
29
42
steps :
30
43
- name : Checkout repository
31
44
uses : actions/checkout@v2
32
45
33
- - name : Install CUDA
34
-
46
+ - name : Install CUDA
47
+
35
48
id : cuda-toolkit
36
49
with :
37
- cuda : ' 11.2.2'
50
+ cuda : ${{ matrix.cuda }}
51
+ linux-local-args : ${{ toJson(matrix.linux-local-args) }}
52
+
53
+ - name : Verify CUDA installation
54
+ run : nvcc --version
38
55
39
56
- name : List CUDA_PATH files (Linux)
40
57
if : runner.os == 'Linux'
41
58
run : find "$CUDA_PATH" -type f
42
-
59
+
43
60
- name : List CUDA_PATH files (Windows)
44
61
if : runner.os == 'Windows'
45
62
shell : pwsh
@@ -48,18 +65,36 @@ jobs:
48
65
# random command that forces rustup to install stuff in rust-toolchain
49
66
- name : Install rust-toolchain
50
67
run : cargo version
51
-
68
+
52
69
- name : Add rustup components
53
70
run : rustup component add rustfmt clippy
54
71
72
+ - name : Install dependencies for LLVM 7
73
+ if : matrix.os == 'ubuntu-24.04'
74
+ run : |
75
+ wget -O libffi7.deb http://security.ubuntu.com/ubuntu/pool/universe/libf/libffi7/libffi7_3.3-5ubuntu1_amd64.deb
76
+ sudo apt-get update
77
+ sudo apt-get install -y ./*.deb
78
+ sudo apt-get install -y liblzma-dev
79
+ sudo apt-get install -y libssl-dev
80
+ sudo apt-get install -y libcurl4-openssl-dev
81
+
55
82
- name : Install LLVM 7
56
83
if : contains(matrix.os, 'ubuntu')
57
- run : |
58
- sudo apt-get install llvm-7
59
- sudo ln -s /usr/bin/llvm-config-7 /usr/local/bin/llvm-config
84
+ run : |
85
+ mkdir -p ~/llvm7 && cd ~/llvm7
86
+ wget http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/llvm-7_7.0.1-12_amd64.deb \
87
+ http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/llvm-7-dev_7.0.1-12_amd64.deb \
88
+ http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/libllvm7_7.0.1-12_amd64.deb \
89
+ http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/llvm-7-runtime_7.0.1-12_amd64.deb
90
+ sudo apt-get update
91
+ sudo apt-get install -y ./*.deb
92
+ sudo ln -s /usr/bin/llvm-config-7 /usr/local/bin/llvm-config
60
93
61
94
- name : Load Rust Cache
62
- uses : Swatinem/rust-cache@v1
95
+
96
+ with :
97
+ key : ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.cuda }}
63
98
64
99
- name : Rustfmt
65
100
if : contains(matrix.os, 'ubuntu')
0 commit comments