@@ -3,18 +3,18 @@ name: Rust CI
33on :
44 pull_request :
55 paths-ignore :
6- - ' **.md'
6+ - " **.md"
77 push :
88 paths-ignore :
9- - ' **.md'
9+ - " **.md"
1010
1111env :
1212 RUST_LOG : info
1313 RUST_BACKTRACE : 1
1414
1515jobs :
1616 rust :
17- name : Rust ${{ matrix.rust }} on ${{ matrix.os }}
17+ name : Rust on ${{ matrix.os }} with CUDA ${{ matrix.cuda }}
1818 runs-on : ${{ matrix.os }}
1919 env :
2020 LLVM_LINK_STATIC : 1
@@ -24,22 +24,39 @@ jobs:
2424 include :
2525 - os : ubuntu-20.04
2626 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 : []
2737 - os : windows-latest
2838 target : x86_64-pc-windows-msvc
39+ cuda : " 12.8.1"
40+ linux-local-args : []
41+
2942 steps :
3043 - name : Checkout repository
3144 uses : actions/checkout@v2
3245
33- - name : Install CUDA
34- uses : Jimver/cuda-toolkit@v0.2.21
46+ - name : Install CUDA
47+ uses : Jimver/cuda-toolkit@v0.2.22
3548 id : cuda-toolkit
3649 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
3855
3956 - name : List CUDA_PATH files (Linux)
4057 if : runner.os == 'Linux'
4158 run : find "$CUDA_PATH" -type f
42-
59+
4360 - name : List CUDA_PATH files (Windows)
4461 if : runner.os == 'Windows'
4562 shell : pwsh
@@ -48,18 +65,36 @@ jobs:
4865 # random command that forces rustup to install stuff in rust-toolchain
4966 - name : Install rust-toolchain
5067 run : cargo version
51-
68+
5269 - name : Add rustup components
5370 run : rustup component add rustfmt clippy
5471
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+
5582 - name : Install LLVM 7
5683 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
6093
6194 - name : Load Rust Cache
62- uses : Swatinem/rust-cache@v1
95+ uses : Swatinem/rust-cache@v2.7.7
96+ with :
97+ key : ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.cuda }}
6398
6499 - name : Rustfmt
65100 if : contains(matrix.os, 'ubuntu')
0 commit comments