Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

ci: streamline screen helper checks

leepokai7330eec36643
diff --git a/.githooks/pre-commit b/.githooks/pre-commit
new file mode 100755
index 00000000..352acf31
--- /dev/null
+++ b/.githooks/pre-commit
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -eu
+
+staged_files=$(git diff --cached --name-only --diff-filter=ACMR)
+
+if printf '%s\n' "$staged_files" | grep -q '^apps/screen-linux/'; then
+ echo "Checking Linux screen helper formatting..."
+ cargo fmt --manifest-path apps/screen-linux/Cargo.toml -- --check
+fi
+
+if printf '%s\n' "$staged_files" | grep -q '^apps/screen-macos/'; then
+ if [ "$(uname -s)" = "Darwin" ]; then
+ echo "Checking macOS screen helper syntax..."
+ xcrun swiftc -parse apps/screen-macos/*.swift
+ else
+ echo "Skipping macOS screen helper syntax check (requires macOS)."
+ fi
+fi
diff --git a/.github/workflows/screen-linux.yml b/.github/workflows/screen-linux.yml
index e622031d..e7619b4e 100644
--- a/.github/workflows/screen-linux.yml
+++ b/.github/workflows/screen-linux.yml
@@ -1,5 +1,9 @@
name: Linux screen helper
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
on:
push:
branches: [main]
@@ -9,13 +13,18 @@ on:
jobs:
test:
+ timeout-minutes: 20
runs-on: ubuntu-24.04
defaults:
run:
working-directory: apps/screen-linux
steps:
- uses: actions/checkout@v4
- - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev
+ - name: Install GStreamer development packages
+ timeout-minutes: 10
+ run: |
+ sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 update
+ sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=60 -o Acquire::https::Timeout=60 install -y --no-install-recommends libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
diff --git a/.github/workflows/screen-macos.yml b/.github/workflows/screen-macos.yml
new file mode 100644
index 00000000..bf636c8c
--- /dev/null
+++ b/.github/workflows/screen-macos.yml
@@ -0,0 +1,50 @@
+name: macOS screen helper
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
+ cancel-in-progress: true
+
+on:
+ push:
+ branches: [main]
+ paths:
+ - "apps/screen-macos/**"
+ - "apps/project.yml"
+ - "kit/Package.swift"
+ - "kit/Package.resolved"
+ - ".github/workflows/screen-macos.yml"
+ pull_request:
+ paths:
+ - "apps/screen-macos/**"
+ - "apps/project.yml"
+ - "kit/Package.swift"
+ - "kit/Package.resolved"
+ - ".github/workflows/screen-macos.yml"
+
+jobs:
+ build:
+ timeout-minutes: 25
+ runs-on: macos-26
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install XcodeGen
+ run: command -v xcodegen >/dev/null || brew install xcodegen
+
+ - name: Generate Xcode project
+ run: xcodegen generate --spec apps/project.yml
+
+ - uses: actions/cache@v4
+ with:
+ path: build/screen-ci/SourcePackages
+ key: ${{ runner.os }}-screen-packages-${{ hashFiles('apps/project.yml', 'kit/Package.swift', 'kit/Package.resolved') }}
+
+ - name: Build screen helper
+ run: >-
+ xcodebuild build
+ -project apps/Codync.xcodeproj
+ -scheme Screen
+ -configuration Debug
+ -destination 'generic/platform=macOS'
+ -derivedDataPath build/screen-ci
+ CODE_SIGNING_ALLOWED=NO
diff --git a/docs/guides/development.md b/docs/guides/development.md
index d1d36926..87bd955b 100644
--- a/docs/guides/development.md
+++ b/docs/guides/development.md
@@ -68,6 +68,19 @@ Unlock the phone when required. Build, install, launch, and visual inspection ar
| APNs relay | `cd relay && npm ci && npm test && npm run typecheck` | Separate package from `cloud/` |
| Linux desktop | `cd apps/linux && cargo test` | GTK 4 and libadwaita development packages |
+### Screen helpers
+
+Enable the repository's staged-file checks once per checkout:
+
+```sh
+git config core.hooksPath .githooks
+```
+
+When a screen helper changes, the pre-commit hook checks Linux Rust formatting
+and parses the macOS Swift sources (on macOS). The platform builds remain in
+GitHub Actions: Linux requires GStreamer development packages, and macOS builds
+the `Screen` Xcode target against WebRTC.
+
Host development: `cargo run --manifest-path host/Cargo.toml -- serve`. Avoid competing with an installed host on port 19222; isolated tests should use a temporary `CODYNC_HOME` and another port. Stop test hosts when finished.
## Visual checks