Skip to content

Commit

Permalink
ci: remove cargo source step
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtrombetta committed Sep 11, 2024
1 parent eddedc4 commit f160cd3
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/test-check-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,67 +15,69 @@ jobs:
format-code:
name: Check Code
runs-on: nvidia-nc4as-t4
env:
CARGO_HOME: ${{ github.workspace }}/.cargo
PATH: ${{ github.workspace }}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
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
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal

- name: Install Dependencies
run: |
source ~/.cargo/env
rustup component add rustfmt
run: rustup component add rustfmt

- name: Run Code Format
run: |
source ~/.cargo/env
cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check
run: cargo fmt --all -- --config imports_granularity=Crate,group_imports=One --check

clippy-code:
name: Clippy Code
runs-on: nvidia-nc4as-t4
env:
CARGO_HOME: ${{ github.workspace }}/.cargo
PATH: ${{ github.workspace }}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
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
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal

- name: Install Dependencies
run: |
source ~/.cargo/env
rustup component add clippy
run: rustup component add clippy

- name: Run Clippy
run: |
source ~/.cargo/env
cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings

test-cpu:
name: Test the CPU backend
runs-on: nvidia-nc4as-t4
env:
CARGO_HOME: ${{ github.workspace }}/.cargo
PATH: ${{ github.workspace }}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
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
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal

- name: Run CPU test
run: |
source ~/.cargo/env
cargo test --features cpu
run: cargo test --features cpu

test-gpu:
name: Test the GPU backend
runs-on: nvidia-nc4as-t4
env:
CARGO_HOME: ${{ github.workspace }}/.cargo
PATH: ${{ github.workspace }}/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
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
run: curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal

- name: Install Dependencies
run: |
Expand All @@ -87,6 +89,4 @@ jobs:
sudo apt-get install -y nvidia-open-560
- name: Run GPU test
run: |
source ~/.cargo/env
cargo test --features gpu
run: cargo test --features gpu

0 comments on commit f160cd3

Please sign in to comment.