Workflow file for this run
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
# .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 | |
- 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 |