fix: ci #5
This file contains 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: Integration | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_check: | |
name: Rust build and checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PyTorch and set up environment | |
run: | | |
pip install torch | |
echo "LIBTORCH_USE_PYTORCH=1" >> $GITHUB_ENV | |
echo "LIBTORCH_BYPASS_VERSION_CHECK=1" >> $GITHUB_ENV | |
echo "LIBTORCH=$(python -c 'import torch;print(torch.utils.cmake_prefix_path)')" >> $GITHUB_ENV | |
echo "LD_LIBRARY_PATH=$(python -c 'import torch;print(torch.utils.cmake_prefix_path)')/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
- name: Format | |
run: cargo fmt -- --check | |
# - name: Linter | |
# run: cargo clippy -- -D warnings | |
- name: Build | |
run: cargo build --verbose | |
- name: Test | |
run: cargo test --verbose |