Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: ci

Louis Beaumont294edf06a35b
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index d20310853..fd5963dad 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -63,7 +63,8 @@ jobs:
# Run pre build
- name: Run pre_build.js on ${{ matrix.platform }}
- run: bun ./examples/apps/screenpipe-app-tauri/scripts/pre_build.js ${{ matrix.pre-build-args }}
+ run: bun ./scripts/pre_build.js ${{ matrix.pre-build-args }}
+ working-directory: ./examples/apps/screenpipe-app-tauri
- name: Install Linux dependencies
if: matrix.platform == 'ubuntu-24.04'
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 1c1630af6..07ba9d468 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -109,9 +109,48 @@ jobs:
name: screenpipe-linux
path: screenpipe-linux.tar.gz
+ build-windows:
+ runs-on: windows-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Rust
+ uses: actions-rs/toolchain@v1
+ with:
+ toolchain: stable
+ profile: minimal
+ override: true
+
+ - name: Install FFmpeg
+ run: |
+ choco install ffmpeg
+
+ - name: Build release
+ run: |
+ cargo build --release
+
+ - name: Download FFmpeg
+ run: |
+ $ProgressPreference = 'SilentlyContinue'
+ Invoke-WebRequest -Uri "https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip" -OutFile "ffmpeg.zip"
+ Expand-Archive -Path "ffmpeg.zip" -DestinationPath "ffmpeg"
+ Move-Item -Path "ffmpeg\ffmpeg-master-latest-win64-gpl\bin\*" -Destination "target\release\"
+
+ - name: Create deployment package
+ run: |
+ $VERSION = $env:GITHUB_REF -replace 'refs/tags/v', ''
+ Compress-Archive -Path target\release\screenpipe.exe, target\release\ffmpeg.exe, target\release\ffprobe.exe -DestinationPath screenpipe-$VERSION-x86_64-pc-windows-msvc.zip
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: screenpipe-windows
+ path: screenpipe-*.zip
+
release:
runs-on: ubuntu-latest
- needs: [build-ubuntu]
+ needs: [build-ubuntu, build-macos, build-windows]
steps:
- name: Checkout code
uses: actions/checkout@v2
@@ -126,6 +165,11 @@ jobs:
with:
name: screenpipe-macos
+ - name: Download Windows Artifact
+ uses: actions/download-artifact@v2
+ with:
+ name: screenpipe-windows
+
- name: Set Version
shell: bash
run: |
@@ -139,3 +183,4 @@ jobs:
gh release create ${{ env.RELEASE_VERSION }} --title ${{ env.RELEASE_VERSION }} --generate-notes
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-linux.tar.gz
gh release upload ${{ env.RELEASE_VERSION }} screenpipe-macos.tar.gz
+ gh release upload ${{ env.RELEASE_VERSION }} screenpipe-windows.zip
diff --git a/examples/apps/screenpipe-app-tauri/scripts/pre_build.js b/examples/apps/screenpipe-app-tauri/scripts/pre_build.js
index 209c5b6a1..e52f67bf6 100644
--- a/examples/apps/screenpipe-app-tauri/scripts/pre_build.js
+++ b/examples/apps/screenpipe-app-tauri/scripts/pre_build.js
@@ -129,7 +129,11 @@ if (platform == 'macos') {
// Install lame using Homebrew
await $`brew install lame`
// Copy lame to ffmpeg ! NEED SUDO
- await $`sudo cp -r /opt/homebrew/opt/lame/lib/* ${config.ffmpegRealname}/lib/`
+ if (await fs.exists(`${config.ffmpegRealname}/lib/`)) {
+ await $`sudo cp -r /opt/homebrew/opt/lame/lib/* ${config.ffmpegRealname}/lib/`
+ } else { // ci
+ await $`sudo cp -r /opt/homebrew/opt/lame/lib/* ./src-tauri/${config.ffmpegRealname}/lib/`
+ }
// Setup FFMPEG
if (!(await fs.exists(config.ffmpegRealname))) {
diff --git a/screenpipe-core/src/ffmpeg.rs b/screenpipe-core/src/ffmpeg.rs
index a308237d9..8fb94da28 100644
--- a/screenpipe-core/src/ffmpeg.rs
+++ b/screenpipe-core/src/ffmpeg.rs
@@ -71,6 +71,19 @@ pub fn find_ffmpeg_path() -> Option<PathBuf> {
}
}
+ #[cfg(target_os = "linux")]
+ {
+ let lib_folder = exe_folder.join("lib");
+ debug!("Lib folder: {:?}", lib_folder);
+ let ffmpeg_in_lib = lib_folder.join(EXECUTABLE_NAME);
+ if ffmpeg_in_lib.exists() {
+ debug!("Found ffmpeg in lib folder: {:?}", ffmpeg_in_lib);
+ return Some(ffmpeg_in_lib);
+ } else {
+ debug!("ffmpeg not found in lib folder");
+ }
+ }
+
error!("ffmpeg not found");
// crash
panic!("ffmpeg not found");