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): preserve Vulkan shader cache in beta rebuild + brew PATH for self-hosted macOS

Louis Beaumont5fa4c3c3a212
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index 6dcf33d4a..8310b8548 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -441,6 +441,8 @@ jobs:
if: matrix.os_type == 'macos'
shell: bash
run: |
+ # Ensure brew is on PATH (self-hosted runners may not have it in default PATH)
+ eval "$(/opt/homebrew/bin/brew shellenv 2>/dev/null || /usr/local/bin/brew shellenv 2>/dev/null || true)"
brew install ffmpeg
- name: Install dependencies
@@ -910,9 +912,10 @@ jobs:
Write-Host "=== Rebuilding with beta config ==="
# Swap to beta config (we're in src-tauri/)
Copy-Item "tauri.beta.conf.json" "tauri.conf.json" -Force
- # Clean ALL bundle artifacts so only beta artifacts exist for upload
- Get-ChildItem -Path "target" -Recurse -Directory -Filter "bundle" | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
- Get-ChildItem -Path "target" -Recurse -Include "*.nsis*","*.exe","*.sig","*.msi" | Where-Object { $_.DirectoryName -match "bundle|release$" } | Remove-Item -Force -ErrorAction SilentlyContinue
+ # Only clean NSIS bundle output (not the entire build tree)
+ # This preserves whisper-rs-sys/Vulkan shader build cache
+ $bundleNsis = "target\x86_64-pc-windows-msvc\release\bundle\nsis"
+ if (Test-Path $bundleNsis) { Remove-Item -Recurse -Force $bundleNsis }
# Rebuild (Rust cached, just repackages) - run from project root
Push-Location ..
bunx tauri build --target x86_64-pc-windows-msvc --features mkl,vulkan,official-build
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 6239a598e..1d31d19f5 100755
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -8719,7 +8719,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.0.394"
+version = "2.0.395"
dependencies = [
"anyhow",
"async-stream",
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs
index 68e497cfe..d6cbc6f90 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs
@@ -18,6 +18,41 @@ use tracing::{debug, error, info, warn};
/// Signals that the background Pi install has finished (success or failure).
static PI_INSTALL_DONE: AtomicBool = AtomicBool::new(false);
+/// On Windows, `.cmd` files cannot be spawned directly with `Command::new()` since
+/// Rust 1.77+ (CVE-2024-24576 fix). We must use `cmd.exe /C` to run them.
+#[cfg(windows)]
+fn build_command_for_path(path: &str) -> Command {
+ if path.ends_with(".cmd") || path.ends_with(".bat") {
+ let mut cmd = Command::new("cmd.exe");
+ cmd.args(["/C", path]);
+ cmd
+ } else {
+ Command::new(path)
+ }
+}
+
+#[cfg(not(windows))]
+fn build_command_for_path(path: &str) -> Command {
+ Command::new(path)
+}
+
+/// Async version for tokio::process::Command
+#[cfg(windows)]
+fn build_async_command_for_path(path: &str) -> tokio::process::Command {
+ if path.ends_with(".cmd") || path.ends_with(".bat") {
+ let mut cmd = tokio::process::Command::new("cmd.exe");
+ cmd.args(["/C", path]);
+ cmd
+ } else {
+ tokio::process::Command::new(path)
+ }
+}
+
+#[cfg(not(windows))]
+fn build_async_command_for_path(path: &str) -> tokio::process::Command {
+ tokio::process::Command::new(path)
+}
+
const PI_PACKAGE: &str = "@mariozechner/pi-coding-agent";
const SCREENPIPE_API_URL: &str = "https://api.screenpi.pe/v1";
@@ -423,8 +458,8 @@ pub async fn pi_start(
info!("Starting pi from {} in dir: {}", pi_path, project_dir);
- // Build command
- let mut cmd = Command::new(&pi_path);
+ // Build command — use cmd.exe /C wrapper for .cmd files on Windows (Rust 1.77+ CVE fix)
+ let mut cmd = build_command_for_path(&pi_path);
cmd.current_dir(&project_dir)
.args(["--mode", "rpc", "--provider", "screenpipe", "--model", "claude-haiku-4-5@20251001"])
.stdin(Stdio::piped())
@@ -727,7 +762,8 @@ pub async fn run(
}
};
- let mut cmd = tokio::process::Command::new(&pi_path);
+ // Use cmd.exe /C wrapper for .cmd files on Windows (Rust 1.77+ CVE fix)
+ let mut cmd = build_async_command_for_path(&pi_path);
cmd.current_dir(working_dir);
cmd.arg("-p").arg(prompt);
cmd.arg("--provider").arg("screenpipe");