-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (40 loc) · 1.82 KB
/
test-check-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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"