Skip to content

Commit

Permalink
Added properly working Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
Hukasx0 committed Oct 4, 2023
1 parent 89d505c commit 85e1322
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Rust

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install libtorch
run: |
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.0.1+cpu.zip
mv libtorch /opt/
shell: bash
- name: Set LIBTORCH environment variable
run: echo "LIBTORCH=/opt/libtorch" >> $GITHUB_ENV
- name: Set LIBTORCH_INCLUDE environment variable
run: echo "LIBTORCH_INCLUDE=/opt/libtorch" >> $GITHUB_ENV
- name: Set LIBTORCH_LIB environment variable
run: echo "LIBTORCH_LIB=/opt/libtorch" >> $GITHUB_ENV
- name: Set LD_LIBRARY_PATH environment variable
run: echo "LD_LIBRARY_PATH=/opt/libtorch/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Build
run: cargo build --verbose

0 comments on commit 85e1322

Please sign in to comment.