Fix warnings. #182
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: CI | |
on: | |
push: { branches: ["master", "main"] } | |
pull_request: { branches: "*" } | |
jobs: | |
build_and_test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install pytorch | |
run: | | |
pip3 install torch==2.0.0 torchvision==0.15.0 --index-url https://download.pytorch.org/whl/cpu | |
echo LIBTORCH_USE_PYTORCH=1 >> "$GITHUB_ENV" | |
echo LD_LIBRARY_PATH="$(python -m site --user-site)/torch/lib${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" >> "$GITHUB_ENV" | |
- name: Checkout code | |
uses: actions/checkout@master | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --features full --color=always | |
- name: Clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --release --features full | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --release --features full --color=always |