Skip to content

ci: install nvidia driver in workflow (PROOF-911) #106

ci: install nvidia driver in workflow (PROOF-911)

ci: install nvidia driver in workflow (PROOF-911) #106

Workflow file for this run

name: Test-Check-Lint
on:
workflow_call:
pull_request:
types:
- opened
- synchronize
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format-code:
name: Check Code
runs-on: nvidia-nc4as-t4
steps:
- name: Checkout Code Format
uses: actions/checkout@v3
- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
- name: Install Dependencies
run: |
source ~/.cargo/env
rustup component add rustfmt
- name: Run Code Format
run: |
source ~/.cargo/env
cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check
clippy-code:
name: Clippy Code
runs-on: nvidia-nc4as-t4
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
- name: Install Dependencies
run: |
source ~/.cargo/env
rustup component add clippy
- name: Run Clippy
run: |
source ~/.cargo/env
cargo clippy --all-targets --all-features -- -D warnings
test-cpu:
name: Test the CPU backend
runs-on: nvidia-nc4as-t4
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
- name: Run CPU test
run: |
source ~/.cargo/env
cargo test --features cpu
test-gpu:
name: Test the GPU backend
runs-on: nvidia-nc4as-t4
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install stable toolchain
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal && source ~/.cargo/env
- name: Install Dependencies
run: |
export DEBIAN_FRONTEND=non-interactive
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install -y nvidia-open-560
- name: Run GPU test
run: |
source ~/.cargo/env
cargo test --features gpu