CI: fixed llc path for build scripts #22
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: 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: Install LLVM | |
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 15 && sudo ln -fs "$(which llc-15)" /usr/bin/llc | |
- name: Build | |
working-directory: ./cutransform | |
run: cargo build --features dynamic-llvm | |
- name: Clippy | |
working-directory: ./cutransform | |
run: cargo clippy --features dynamic-llvm -- -Dwarnings -W clippy::pedantic -W clippy::nursery -W clippy::unwrap_used | |
- name: Formatting | |
working-directory: ./cutransform | |
run: cargo fmt --check | |
examples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Jimver/[email protected] | |
id: cuda-toolkit | |
with: | |
sub-packages: '["nvcc"]' | |
method: 'network' | |
linux-local-args: '["--toolkit"]' | |
- name: Install LLVM | |
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 15 && sudo ln -fs "$(which llc-15)" /usr/bin/llc | |
- name: Install Zig | |
uses: goto-bus-stop/setup-zig@v2 | |
with: | |
version: 0.10.1 | |
- name: Compile cutransform | |
working-directory: ./cutransform | |
run: cargo build --release --features dynamic-llvm | |
- 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 | |