Fixed tests workflow #10
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Format | |
| run: cargo fmt --all -- --check | |
| - name: Clippy (default/CPU path) | |
| run: cargo clippy --workspace --all-targets -- -D warnings | |
| - name: Test (default/CPU path) | |
| run: cargo test --workspace --release | |
| - name: Clippy (GPU feature) | |
| run: cargo clippy --workspace --all-targets --no-default-features --features gpu -- -D warnings | |
| - name: Check (GPU feature) | |
| run: cargo check --workspace --all-targets --no-default-features --features gpu |