updates #49
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
push: | |
paths-ignore: | |
- '**.md' | |
branches: | |
- main | |
env: | |
RUST_LOG: info | |
RUST_BACKTRACE: 1 | |
jobs: | |
rust: | |
name: Rust ${{ matrix.rust }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
env: | |
LLVM_LINK_STATIC: 1 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
#- os: ubuntu-20.04 | |
#target: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install CUDA | |
uses: Jimver/cuda-toolkit@v0.2.11 | |
id: cuda-toolkit | |
with: | |
cuda: '11.2.2' | |
# 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 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 | |
echo "PATH=${CUDA_PATH}/nvvm/lib64:${PATH}" >> $GITHUB_ENV | |
echo "CUDA_ROOT=${CUDA_PATH}:${PATH}" >> $GITHUB_ENV | |
- name: Load Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Rustfmt | |
run: cargo fmt --all --exclude generator -- --check | |
- name: Build | |
run: cargo build --all --exclude generator | |
# Don't currently test because many tests rely on the system having a CUDA GPU | |
# - name: Test | |
# run: cargo test --workspace | |
- name: Clippy | |
env: | |
RUSTFLAGS: -Dwarnings | |
run: cargo clippy --all --tests --exclude generator | |