Skip to content

Commit

Permalink
chore: ci updates
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Jul 31, 2024
1 parent c804fcf commit 4ce6661
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 70 deletions.
49 changes: 22 additions & 27 deletions .github/workflows/release-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ jobs:
- name: setup Bun
uses: oven-sh/setup-bun@v1

# - name: Rust cache
# uses: swatinem/rust-cache@v2
- name: Rust cache
uses: swatinem/rust-cache@v2

- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand All @@ -80,25 +80,26 @@ jobs:
override: true
target: ${{ matrix.target }}

# - name: Cache Pre Build
# id: cache-pre-build
# uses: actions/cache@v4
# with:
# path: |
# examples/apps/screenpipe-app-tauri/src-tauri/openblas
# examples/apps/screenpipe-app-tauri/src-tauri/clblast
# examples/apps/screenpipe-app-tauri/src-tauri/ffmpeg
# key: ${{ matrix.platform }}-${{ matrix.args }}-pre-build

# - uses: actions/cache@v3
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
# key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Cache Pre Build
id: cache-pre-build
uses: actions/cache@v4
with:
path: |
examples/apps/screenpipe-app-tauri/src-tauri/openblas
examples/apps/screenpipe-app-tauri/src-tauri/clblast
examples/apps/screenpipe-app-tauri/src-tauri/ffmpeg
examples/apps/screenpipe-app-tauri/src-tauri/tesseract-*
key: ${{ matrix.platform }}-${{ matrix.args }}-pre-build

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-24.04'
Expand All @@ -111,12 +112,6 @@ jobs:
run: |
brew install ffmpeg pkg-config
# - name: Install Windows dependencies
# if: matrix.platform == 'windows-latest'
# run: |
# choco install pkgconfiglite
# choco install ffmpeg

- name: Install frontend dependencies
shell: bash
working-directory: ./examples/apps/screenpipe-app-tauri
Expand Down
86 changes: 43 additions & 43 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,54 +105,54 @@ jobs:
name: screenpipe-macos-${{ matrix.target }}
path: screenpipe-*.tar.gz

build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
# 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: 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: 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: 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: 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: 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
# - name: Upload Artifact
# uses: actions/upload-artifact@v2
# with:
# name: screenpipe-linux
# path: screenpipe-linux.tar.gz

# build-windows:
# runs-on: windows-latest
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:

release:
runs-on: ubuntu-latest
needs: [build-ubuntu, build-macos] # build-windows windows not supported atm, build from source bro
needs: [build-macos] # ubuntu, build-windows windows not supported atm, build from source bro
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down

0 comments on commit 4ce6661

Please sign in to comment.