Skip to content

enabled stricter linter warnings #15

enabled stricter linter warnings

enabled stricter linter warnings #15

Workflow file for this run

name: cutransform
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: ./llvm
key: llvm-15.0
- name: Install LLVM
uses: KyleMayes/install-llvm-action@v1.8.0
with:
version: "15.0"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Build
working-directory: ./cutransform
env:
LLVM_SYS_150_PREFIX: ${{ env.LLVM_PATH }}
run: cargo build
- name: Clippy
working-directory: ./cutransform
env:
LLVM_SYS_150_PREFIX: ${{ env.LLVM_PATH }}
run: cargo clippy -- -Dwarnings -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used
- name: Formatting
working-directory: ./cutransform
env:
LLVM_SYS_150_PREFIX: ${{ env.LLVM_PATH }}
run: cargo fmt --check
examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Jimver/cuda-toolkit@v0.2.10
id: cuda-toolkit
with:
linux-local-args: '["--toolkit"]'
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v3
with:
path: ./llvm
key: llvm-15.0
- name: Install LLVM
uses: KyleMayes/install-llvm-action@v1.8.0
with:
version: "15.0"
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install Zig
uses: goto-bus-stop/setup-zig@v2
with:
version: 0.10.1
- name: Compile cutransform
working-directory: ./cutransform
env:
LLVM_SYS_150_PREFIX: ${{ env.LLVM_PATH }}
run: cargo build --release
- name: Install nvptx Rust target
run: rustup target add nvptx64-nvidia-cuda
- name: Rust Build
working-directory: ./rust-example
run: cargo build
- name: Rust Clippy
working-directory: ./rust-example
run: cargo clippy -- -Dwarnings -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used
- name: Rust Formatting
working-directory: ./rust-example
run: cargo fmt --check
- name: C Build
working-directory: ./c-example
env:
C_INCLUDE_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/include:${{ env.C_INCLUDE_PATH }}
LIBRARY_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/stubs:${{ env.LD_LIBRARY_PATH }}
LD_LIBRARY_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/stubs:${{ env.LD_LIBRARY_PATH }}
run: ./build.sh
- name: Zig Build
working-directory: ./zig-example
env:
C_INCLUDE_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/include:${{ env.C_INCLUDE_PATH }}
LIBRARY_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/stubs:${{ env.LD_LIBRARY_PATH }}
LD_LIBRARY_PATH: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/stubs:${{ env.LD_LIBRARY_PATH }}
run: zig build