Skip to content

ci: setup ci tests and checks ( PROOF-622 ) #3

ci: setup ci tests and checks ( PROOF-622 )

ci: setup ci tests and checks ( PROOF-622 ) #3

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: self-hosted
steps:
- name: Checkout Code Format
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --privileged spaceandtimelabs/blitzar:12.2.0-cuda-1.71.1-rust-0 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; /root/.cargo/bin/cargo fmt --all -- --check"
clippy-code:
name: Clippy Code
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --privileged spaceandtimelabs/blitzar:12.2.0-cuda-1.71.1-rust-0 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; /root/.cargo/bin/rustup component add clippy; /root/.cargo/bin/cargo clippy --all-targets --all-features -- -D warnings"
test-cpu:
name: Test the CPU backend
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --privileged spaceandtimelabs/blitzar:12.2.0-cuda-1.71.1-rust-0 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; /root/.cargo/bin/cargo test --features cpu"
test-gpu:
name: Test the GPU backend
runs-on: self-hosted
steps:
- name: Checkout Code
uses: actions/checkout@v3
- run: docker run --rm -v "$PWD":/src:ro -w /src --gpus all --privileged spaceandtimelabs/blitzar:12.2.0-cuda-1.71.1-rust-0 /bin/bash -c "nvidia-smi"
- run: docker run --rm -v "$PWD":/src:ro -w /src --gpus all --privileged spaceandtimelabs/blitzar:12.2.0-cuda-1.71.1-rust-0 /bin/bash -c "cp -av /src/ /src_tmp/; cd /src_tmp; /root/.cargo/bin/cargo test --features gpu"