Skip to content

Commit

Permalink
Install pytorch on github CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es committed Jul 31, 2023
1 parent 9c0261b commit 208747b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ jobs:
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"
echo LD_LIBRARY_PATH="$(python -m site --user-site)/torch/lib:$LD_LIBRARY_PATH" >> "$GITHUB_ENV"
echo "LALALA="
cat "$GITHUB_ENV"
- name: Checkout code
uses: actions/checkout@master

Expand All @@ -22,18 +31,24 @@ jobs:

- name: Build
uses: actions-rs/cargo@v1
env:
LIBTORCH_USE_PYTORCH: 1
with:
command: build
args: --release --features full --color=always

- name: Clippy
uses: actions-rs/clippy-check@v1
env:
LIBTORCH_USE_PYTORCH: 1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --release --features full

- name: Test
uses: actions-rs/cargo@v1
env:
LIBTORCH_USE_PYTORCH: 1
with:
command: test
args: --release --features full --color=always

0 comments on commit 208747b

Please sign in to comment.