fix: Correct type conversion from tch::Tensor to Vec<f32> #31
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: CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install LibTorch | |
| run: | | |
| curl -L https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.0%2Bcpu.zip -o libtorch.zip | |
| unzip libtorch.zip | |
| echo "LIBTORCH=$(pwd)/libtorch" >> $GITHUB_ENV | |
| echo "LD_LIBRARY_PATH=$(pwd)/libtorch/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
| - name: Build | |
| run: cargo build --verbose --workspace | |
| - name: Run tests | |
| run: cargo test --verbose --workspace | |
| - name: Run clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check |