Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 47 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: Rust CI
on:
pull_request:
paths-ignore:
- '**.md'
- "**.md"
push:
paths-ignore:
- '**.md'
- "**.md"

env:
RUST_LOG: info
RUST_BACKTRACE: 1

jobs:
rust:
name: Rust ${{ matrix.rust }} on ${{ matrix.os }}
name: Rust on ${{ matrix.os }} with CUDA ${{ matrix.cuda }}
runs-on: ${{ matrix.os }}
env:
LLVM_LINK_STATIC: 1
Expand All @@ -24,22 +24,39 @@ jobs:
include:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
cuda: "11.2.2"
linux-local-args: ["--toolkit"]
- os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
cuda: "12.8.1"
linux-local-args: ["--toolkit"]
- os: windows-latest
target: x86_64-pc-windows-msvc
cuda: "11.2.2"
linux-local-args: []
- os: windows-latest
target: x86_64-pc-windows-msvc
cuda: "12.8.1"
linux-local-args: []

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install CUDA
uses: Jimver/[email protected].21
- name: Install CUDA
uses: Jimver/[email protected].22
id: cuda-toolkit
with:
cuda: '11.2.2'
cuda: ${{ matrix.cuda }}
linux-local-args: ${{ toJson(matrix.linux-local-args) }}

- name: Verify CUDA installation
run: nvcc --version

- name: List CUDA_PATH files (Linux)
if: runner.os == 'Linux'
run: find "$CUDA_PATH" -type f

- name: List CUDA_PATH files (Windows)
if: runner.os == 'Windows'
shell: pwsh
Expand All @@ -48,18 +65,36 @@ jobs:
# random command that forces rustup to install stuff in rust-toolchain
- name: Install rust-toolchain
run: cargo version

- name: Add rustup components
run: rustup component add rustfmt clippy

- name: Install dependencies for LLVM 7
if: matrix.os == 'ubuntu-24.04'
run: |
wget -O libffi7.deb http://security.ubuntu.com/ubuntu/pool/universe/libf/libffi7/libffi7_3.3-5ubuntu1_amd64.deb
sudo apt-get update
sudo apt-get install -y ./*.deb
sudo apt-get install -y liblzma-dev
sudo apt-get install -y libssl-dev
sudo apt-get install -y libcurl4-openssl-dev

- name: Install LLVM 7
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get install llvm-7
sudo ln -s /usr/bin/llvm-config-7 /usr/local/bin/llvm-config
run: |
mkdir -p ~/llvm7 && cd ~/llvm7
wget http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/llvm-7_7.0.1-12_amd64.deb \
http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/llvm-7-dev_7.0.1-12_amd64.deb \
http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/libllvm7_7.0.1-12_amd64.deb \
http://mirrors.kernel.org/ubuntu/pool/universe/l/llvm-toolchain-7/llvm-7-runtime_7.0.1-12_amd64.deb
sudo apt-get update
sudo apt-get install -y ./*.deb
sudo ln -s /usr/bin/llvm-config-7 /usr/local/bin/llvm-config

- name: Load Rust Cache
uses: Swatinem/rust-cache@v1
uses: Swatinem/[email protected]
with:
key: ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.cuda }}

- name: Rustfmt
if: contains(matrix.os, 'ubuntu')
Expand Down
Loading