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

release-app fix #1379

Louis Beaumontd3579f92d8cc
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index d516a7158..1a34c09db 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -137,19 +137,22 @@ jobs:
args: "--target aarch64-apple-darwin --features metal"
target: aarch64-apple-darwin
tauri-args: "--target aarch64-apple-darwin --config src-tauri/tauri.conf.prod.json"
+ os_type: "macos"
- platform: "macos-latest"
args: "--target x86_64-apple-darwin --features metal"
target: x86_64-apple-darwin
tauri-args: "--target x86_64-apple-darwin --config src-tauri/tauri.conf.prod.json"
+ os_type: "macos"
- platform: ${{ needs.check_runner.outputs.runner_type }}
args: "--target x86_64-pc-windows-msvc --features mkl"
pre-build-args: ""
tauri-args: "--target x86_64-pc-windows-msvc --config src-tauri/tauri.conf.prod.json"
+ os_type: "windows"
runs-on: ${{ matrix.platform }}
steps:
- name: Enable Git long paths on Windows
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
Write-Host "Enabling git core.longpaths..."
@@ -191,20 +194,20 @@ jobs:
node-version: 20
- name: Set up Rust
- if: !contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type != 'windows'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.target }}
- name: Install Rust
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
run: |
Invoke-WebRequest https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe -OutFile rustup-init.exe
.\rustup-init.exe -y
- name: setup rust path
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
$env:PATH = "$env:USERPROFILE\.cargo\bin;$env:PATH"
@@ -280,7 +283,7 @@ jobs:
${{ matrix.platform }}-${{ matrix.target }}-pre-build-
- name: Install dependencies
- if: matrix.platform == 'macos-latest'
+ if: matrix.os_type == 'macos'
shell: bash
run: |
brew install ffmpeg
@@ -290,17 +293,17 @@ jobs:
run: bun install
- name: Install vcpkg
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3"
- name: Set up MSVC
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Install 7zip
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
$7zipUrl = "https://7-zip.org/a/7z2301-x64.exe"
@@ -308,13 +311,11 @@ jobs:
Invoke-WebRequest -Uri $7zipUrl -OutFile $7zipInstaller
Start-Process -FilePath .\$7zipInstaller -Args "/S" -Wait
Remove-Item $7zipInstaller
- # Add 7zip to PATH and make it persistent for subsequent steps
echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- # Verify installation
& "C:\Program Files\7-Zip\7z.exe" i
- name: Cache LLVM
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
id: cache-llvm
uses: actions/cache@v4
with:
@@ -324,7 +325,7 @@ jobs:
key: llvm-10.0-windows-${{ hashFiles('.github/workflows/release-app.yml') }}
- name: Install LLVM and Clang
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && steps.cache-llvm.outputs.cache-hit != 'true'
+ if: matrix.os_type == 'windows' && steps.cache-llvm.outputs.cache-hit != 'true'
shell: powershell
run: |
# Create LLVM directory with proper permissions
@@ -356,7 +357,7 @@ jobs:
Write-Host "LLVM installation completed successfully"
- name: Install wget on Windows
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
env:
SKIP_SCREENPIPE_SETUP: true
@@ -394,17 +395,17 @@ jobs:
working-directory: ./screenpipe-app-tauri
- name: Build CLI
- if: matrix.tauri-args != '--target x86_64-pc-windows-msvc'
+ if: matrix.os_type != 'windows'
shell: bash
run: |
- if [[ "${{ matrix.platform }}" == "macos-latest" ]]; then
- export PKG_CONFIG_PATH="/usr/local/opt/ffmpeg/lib/pkgconfig:$PKG_CONFIG_PATH"
- export PKG_CONFIG_ALLOW_CROSS=1
+ if [[ "${{ matrix.os_type }}" == "macos" ]]; then
+ export PKG_CONFIG_PATH="/usr/local/opt/ffmpeg/lib/pkgconfig:$PKG_CONFIG_PATH"
+ export PKG_CONFIG_ALLOW_CROSS=1
fi
cargo build --release -p screenpipe-server ${{ matrix.args }}
- name: Build CLI on Windows
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
env:
CARGO_PROFILE_RELEASE_STRIP: symbols
@@ -419,12 +420,12 @@ jobs:
working-directory: ./screenpipe-app-tauri
- uses: actions/setup-python@v5
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
with:
python-version: '3.13'
- name: Copy library for MKL
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
# Create target directory
@@ -455,7 +456,7 @@ jobs:
Remove-Item -Path $temp_dir -Recurse -Force
- name: Copy library for vcredist
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
# Create target directory
@@ -495,18 +496,18 @@ jobs:
# https://tauri.app/v1/guides/distribution/sign-macos
CI: true
# Optimize for build speed on Windows
- CARGO_PROFILE_RELEASE_LTO: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'thin' || 'false' }}
- CARGO_PROFILE_RELEASE_OPT_LEVEL: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '2' || '3' }}
- CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '16' || '16' }}
+ CARGO_PROFILE_RELEASE_LTO: ${{ matrix.os_type == 'windows' && 'thin' || 'false' }}
+ CARGO_PROFILE_RELEASE_OPT_LEVEL: ${{ matrix.os_type == 'windows' && '2' || '3' }}
+ CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ matrix.os_type == 'windows' && '16' || '16' }}
# Enable incremental compilation for Windows
- CARGO_INCREMENTAL: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'true' || 'false' }}
- # Windows specific optimizations (only applied when building for Windows)
- CARGO_PROFILE_RELEASE_STRIP: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'symbols' || 'none' }}
- CARGO_PROFILE_RELEASE_PANIC: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'abort' || 'unwind' }}
- CARGO_PROFILE_RELEASE_INCREMENTAL: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'false' || 'true' }}
- RUSTFLAGS: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '-C target-feature=+crt-static -C link-arg=/LTCG' || '' }}
+ CARGO_INCREMENTAL: ${{ matrix.os_type == 'windows' && 'true' || 'false' }}
+ # Windows specific optimizations
+ CARGO_PROFILE_RELEASE_STRIP: ${{ matrix.os_type == 'windows' && 'symbols' || 'none' }}
+ CARGO_PROFILE_RELEASE_PANIC: ${{ matrix.os_type == 'windows' && 'abort' || 'unwind' }}
+ CARGO_PROFILE_RELEASE_INCREMENTAL: ${{ matrix.os_type == 'windows' && 'false' || 'true' }}
+ RUSTFLAGS: ${{ matrix.os_type == 'windows' && '-C target-feature=+crt-static -C link-arg=/LTCG' || '' }}
VCPKG_STATIC_LINKAGE: "true"
- KNF_STATIC_CRT: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '1' || '' }}
+ KNF_STATIC_CRT: ${{ matrix.os_type == 'windows' && '1' || '' }}
with:
args: ${{ matrix.tauri-args }}
projectPath: "./screenpipe-app-tauri"
@@ -514,7 +515,7 @@ jobs:
retryAttempts: 3
- name: Download and Run CLI Manually (Windows)
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
env:
CN_API_KEY: ${{ secrets.CN_API_KEY }}
@@ -569,7 +570,7 @@ jobs:
}
- name: Upload Assets to CrabNebula Cloud (Non-Windows)
- if: matrix.tauri-args != '--target x86_64-pc-windows-msvc'
+ if: matrix.os_type != 'windows'
uses: crabnebula-dev/[email protected]
env:
CN_VERBOSE: "2"
@@ -587,12 +588,13 @@ jobs:
fail-fast: false
matrix:
include:
- - platform: windows-latest # Windows x86_64
- args: "--target x86_64-pc-windows-msvc --features mkl" # TODO CUDA --features "openblas"
- pre-build-args: "" # --openblas
+ - platform: windows-latest
+ args: "--target x86_64-pc-windows-msvc --features mkl"
+ pre-build-args: ""
tauri-args: "--target x86_64-pc-windows-msvc"
shell: pwsh
target: x86_64-pc-windows-msvc
+ os_type: "windows"
runs-on: ${{ matrix.platform }}
steps:
@@ -619,7 +621,7 @@ jobs:
node-version: 20
- name: Install Rust
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
run: |
Invoke-WebRequest https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-gnu/rustup-init.exe -OutFile rustup-init.exe
.\rustup-init.exe -y
@@ -667,17 +669,17 @@ jobs:
run: bun install
- name: Install vcpkg
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: "7adc2e4d49e8d0efc07a369079faa6bc3dbb90f3"
- name: Set up MSVC
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
uses: ilammy/msvc-dev-cmd@v1
- name: Install 7zip
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
$7zipUrl = "https://7-zip.org/a/7z2301-x64.exe"
@@ -685,13 +687,11 @@ jobs:
Invoke-WebRequest -Uri $7zipUrl -OutFile $7zipInstaller
Start-Process -FilePath .\$7zipInstaller -Args "/S" -Wait
Remove-Item $7zipInstaller
- # Add 7zip to PATH and make it persistent for subsequent steps
echo "C:\Program Files\7-Zip" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- # Verify installation
& "C:\Program Files\7-Zip\7z.exe" i
- name: Cache LLVM
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
id: cache-llvm
uses: actions/cache@v4
with:
@@ -701,7 +701,7 @@ jobs:
key: llvm-10.0-windows-${{ hashFiles('.github/workflows/release-app.yml') }}
- name: Install LLVM and Clang
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && steps.cache-llvm.outputs.cache-hit != 'true'
+ if: matrix.os_type == 'windows' && steps.cache-llvm.outputs.cache-hit != 'true'
uses: KyleMayes/install-llvm-action@v2
with:
version: "10.0"
@@ -714,7 +714,7 @@ jobs:
working-directory: ./screenpipe-app-tauri
- name: Build CLI on Windows
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: pwsh
env:
CARGO_PROFILE_RELEASE_STRIP: symbols
@@ -729,31 +729,48 @@ jobs:
working-directory: ./screenpipe-app-tauri
- name: Install pip
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Copy library for MKL
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: pwsh
run: |
- # Install pip first
- Invoke-WebRequest -Uri https://bootstrap.pypa.io/get-pip.py -OutFile get-pip.py
- python get-pip.py
- # Continue with existing steps
- mkdir omp
- pip install intel-openmp --target omp
- # Create mkl directory if it doesn't exist (ignore error if it does)
- mkdir screenpipe-app-tauri/src-tauri/mkl/ -ErrorAction SilentlyContinue
- ls -Path ./omp -Recurse -Filter *.dll | cp -Destination screenpipe-app-tauri/src-tauri/mkl/
+ # Create target directory
+ $mkl_dir = "screenpipe-app-tauri/src-tauri/mkl"
+ New-Item -ItemType Directory -Force -Path $mkl_dir | Out-Null
+
+ # Install and copy Intel OpenMP
+ python -m pip install --upgrade pip
+ $temp_dir = "temp_omp"
+ New-Item -ItemType Directory -Force -Path $temp_dir | Out-Null
+
+ Write-Host "Installing Intel OpenMP..."
+ python -m pip install intel-openmp --target $temp_dir
+
+ Write-Host "Copying DLL files..."
+ Get-ChildItem -Path $temp_dir -Recurse -Filter "*.dll" | ForEach-Object {
+ Write-Host "Copying $_"
+ Copy-Item $_.FullName -Destination $mkl_dir -Force
+ }
+
+ # Verify DLLs were copied
+ $dll_count = (Get-ChildItem -Path $mkl_dir -Filter "*.dll").Count
+ Write-Host "Found $dll_count DLLs in target directory"
+ if ($dll_count -eq 0) {
+ throw "No DLLs found in target directory!"
+ }
+
+ Remove-Item -Path $temp_dir -Recurse -Force
- name: Copy library for vcredist
- if: contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc')
+ if: matrix.os_type == 'windows'
shell: powershell
run: |
# Create target directory
- $vcredist_dir = "screenpipe-app-tauri/src-tauri/vcredist"
+ $vcredist_dir = "screenpipe-app-tauri/src-tauri/"
New-Item -ItemType Directory -Force -Path $vcredist_dir | Out-Null
# Install and copy VcRedist
@@ -762,10 +779,7 @@ jobs:
iex ((New-Object System.Net.WebClient).DownloadString('https://vcredist.com/install.ps1'))
Write-Host "Copying DLL files..."
- Get-ChildItem -Path $temp_dir -Recurse -Filter "*.dll" | ForEach-Object {
- Write-Host "Copying $_"
- Copy-Item $_.FullName -Destination $vcredist_dir -Force
- }
+ Copy-Item C:\Windows\System32\vcruntime140.dll -Destination $vcredist_dir -Force
# Verify DLLs were copied
$dll_count = (Get-ChildItem -Path $vcredist_dir -Filter "*.dll").Count
@@ -792,18 +806,18 @@ jobs:
# https://tauri.app/v1/guides/distribution/sign-macos
CI: true
# Optimize for build speed on Windows
- CARGO_PROFILE_RELEASE_LTO: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'thin' || 'false' }}
- CARGO_PROFILE_RELEASE_OPT_LEVEL: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '2' || '3' }}
- CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '16' || '16' }}
+ CARGO_PROFILE_RELEASE_LTO: ${{ matrix.os_type == 'windows' && 'thin' || 'false' }}
+ CARGO_PROFILE_RELEASE_OPT_LEVEL: ${{ matrix.os_type == 'windows' && '2' || '3' }}
+ CARGO_PROFILE_RELEASE_CODEGEN_UNITS: ${{ matrix.os_type == 'windows' && '16' || '16' }}
# Enable incremental compilation for Windows
- CARGO_INCREMENTAL: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'true' || 'false' }}
- # Windows specific optimizations (only applied when building for Windows)
- CARGO_PROFILE_RELEASE_STRIP: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'symbols' || 'none' }}
- CARGO_PROFILE_RELEASE_PANIC: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'abort' || 'unwind' }}
- CARGO_PROFILE_RELEASE_INCREMENTAL: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && 'false' || 'true' }}
- RUSTFLAGS: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '-C target-feature=+crt-static -C link-arg=/LTCG' || '' }}
+ CARGO_INCREMENTAL: ${{ matrix.os_type == 'windows' && 'true' || 'false' }}
+ # Windows specific optimizations
+ CARGO_PROFILE_RELEASE_STRIP: ${{ matrix.os_type == 'windows' && 'symbols' || 'none' }}
+ CARGO_PROFILE_RELEASE_PANIC: ${{ matrix.os_type == 'windows' && 'abort' || 'unwind' }}
+ CARGO_PROFILE_RELEASE_INCREMENTAL: ${{ matrix.os_type == 'windows' && 'false' || 'true' }}
+ RUSTFLAGS: ${{ matrix.os_type == 'windows' && '-C target-feature=+crt-static -C link-arg=/LTCG' || '' }}
VCPKG_STATIC_LINKAGE: "true"
- KNF_STATIC_CRT: ${{ contains(matrix.tauri-args, '--target x86_64-pc-windows-msvc') && '1' || '' }}
+ KNF_STATIC_CRT: ${{ matrix.os_type == 'windows' && '1' || '' }}
with:
args: ${{ matrix.tauri-args }}
projectPath: "./screenpipe-app-tauri"