-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.42 KB
/
training-loop-build-rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# .github/workflows/build.yml
name: "Training Loop: Build Rust Binary"
on:
# pull_request:
# branches:
# - main
release:
types: [created]
jobs:
build:
name: Build
runs-on: local
container:
image: ghcr.io/digital-defiance/sentiment-analysis-pipeline:main
steps:
- run: apt update && apt install curl -y
- uses: actions/checkout@master
- uses: dtolnay/rust-toolchain@stable
- run: apt install libssh-dev -y
- run: apt install pkg-config -y
- name: Find and set torch lib path
run: |
SITE_PACKAGES=$(python -c "import site; print(site.getsitepackages()[0])")
TORCH_LIB_PATH="${SITE_PACKAGES}/torch/lib"
echo "LD_LIBRARY_PATH=$TORCH_LIB_PATH" >> $GITHUB_ENV
echo "LIBTORCH_USE_PYTORCH=1" >> $GITHUB_ENV
echo "RUST_BACKTRACE=full" >> $GITHUB_ENV
- run: cargo check
- run: cargo test
- if: ${{ github.event_name == 'release' }}
run: cargo build --release --target-dir build
- if: ${{ github.event_name == 'release' }}
name: Upload artifact to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/release/llm-voice-chat
asset_name: llm-voice-chat
asset_content_type: application/octet-stream