Skip to content

fix: cut gpu usage by 80% #34

fix: cut gpu usage by 80%

fix: cut gpu usage by 80% #34

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*.*"
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libasound2-dev
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Build with RPATH
run: |
export PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH"
export RUSTFLAGS="-C link-arg=-Wl,-rpath,\$ORIGIN/lib"
cargo build --release
- name: Copy FFmpeg libraries
run: |
mkdir -p target/release/lib
cp /usr/lib/x86_64-linux-gnu/libavcodec.so* target/release/lib/
cp /usr/lib/x86_64-linux-gnu/libavformat.so* target/release/lib/
cp /usr/lib/x86_64-linux-gnu/libavutil.so* target/release/lib/
cp /usr/lib/x86_64-linux-gnu/libswresample.so* target/release/lib/
cp /usr/lib/x86_64-linux-gnu/libswscale.so* target/release/lib/
cp /usr/lib/x86_64-linux-gnu/libavfilter.so* target/release/lib/
cp /usr/lib/x86_64-linux-gnu/libavdevice.so* target/release/lib/
- name: Create deployment package
run: |
mkdir -p screenpipe-linux
cp target/release/screenpipe screenpipe-linux/screenpipe
cp -r target/release/lib screenpipe-linux/
chmod +x screenpipe-linux/screenpipe
tar -czvf screenpipe-linux.tar.gz screenpipe-linux
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: screenpipe-linux
path: screenpipe-linux.tar.gz
release:
runs-on: ubuntu-latest
needs: [build-ubuntu]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: screenpipe-linux
- name: Set Version
shell: bash
run: |
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
echo "RELEASE_VERSION=$(echo ${GITHUB_REF_NAME} | cut -f1 -d-)" >> $GITHUB_ENV
- name: Create or update Release
env:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh release create ${{ env.RELEASE_VERSION }} --title ${{ env.RELEASE_VERSION }} --generate-notes
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-linux.tar.gz