Skip to content

fix(desktop-gpui): release preview textures the GPU atlas keeps after dialogs close #10606

fix(desktop-gpui): release preview textures the GPU atlas keeps after dialogs close

fix(desktop-gpui): release preview textures the GPU atlas keeps after dialogs close #10606

Workflow file for this run

name: "CI"
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
pull-requests: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
# A cancelled main run never reaches its cache save. Main runs still never
# pile up: GitHub keeps at most one pending run per group.
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
changes:
name: Detect Changes
runs-on: blacksmith-8vcpu-ubuntu-2404
outputs:
rust: ${{ steps.filter.outputs.rust }}
gpui: ${{ steps.filter.outputs.rust == 'true' || steps.filter.outputs.gpui == 'true' || steps.desktop-resources.outputs.desktop-resources == 'true' }}
tauri-plugins: ${{ steps.filter.outputs.tauri-plugins }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
rust:
- '.cargo/**'
- '.github/actions/install-desktop-deps/**'
- '.github/actions/setup-rust-cache/**'
- '.github/workflows/ci.yml'
- 'apps/cli/**'
- 'crates/**'
- 'vendor/**'
- 'scripts/diagnostic-build.rs'
- 'scripts/setup.js'
- 'Cargo.toml'
- 'Cargo.lock'
gpui:
- '.gitattributes'
- 'apps/desktop-gpui/**'
- 'apps/desktop/src/assets/**'
- 'apps/desktop/src-tauri/src/recording_start_sound.rs'
- 'apps/media-server/src/__tests__/fixtures/**'
- 'packages/ui-solid/icons/**'
- 'scripts/build-desktop-binaries*'
- 'scripts/build-gpui-binary.sh'
- 'scripts/build-linux-packages.mjs'
- 'scripts/build-macos-packages*'
- 'scripts/bundle-gpui*'
- 'scripts/finalize-linux-*'
- 'scripts/finalize-macos-*'
- 'scripts/linux-bundle-config*'
- 'scripts/prepare-gpui-dependency*'
- 'scripts/run-gpui-build*'
- 'scripts/sync-desktop-versions.mjs'
- 'scripts/verify-gpui-release-inputs.mjs'
- 'scripts/verify-windows-stack.mjs'
tauri-plugins:
- 'Cargo.lock'
- 'bun.lock'
- 'scripts/check-tauri-plugin-versions*'
- 'apps/desktop/package.json'
# Cap ships as the GPUI app, which embeds icons, sounds, assets and test
# data from apps/desktop. Only the Tauri app's own sources are skipped.
- name: Check for GPUI resources in apps/desktop
uses: dorny/paths-filter@v3
id: desktop-resources
with:
predicate-quantifier: every
filters: |
desktop-resources:
- 'apps/desktop/**'
- '!apps/desktop/src/**'
- '!apps/desktop/src-tauri/src/**'
- '!apps/desktop/src-tauri/tests/**'
- '!apps/desktop/src-tauri/gen/**'
typecheck:
name: Typecheck
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/setup-js
- run: bun run --cwd apps/web next typegen
- name: Check MCP card bundle
run: bun run --cwd apps/web mcp-card:check
- name: Test workspace tooling
run: |
node --test scripts/bun-scripts.test.mjs scripts/check-tauri-plugin-versions.test.mjs
bun run --cwd apps/desktop vitest run scripts/prepare.test.js
- name: Test Loops profile sync
run: |
bun test scripts/loops/profile.test.ts scripts/loops/lifecycle.test.ts
bun run tsc --noEmit --strict --jsx react-jsx --allowImportingTsExtensions --target ESNext --module ESNext --moduleResolution bundler --resolveJsonModule --types bun --skipLibCheck scripts/loops/*.ts
- name: Test render farm orchestration
run: |
bun test apps/render-farm
bun run --cwd apps/render-farm typecheck
- name: Test web React compatibility
run: >-
bun run --cwd apps/web test
__tests__/unit/embed-video-playback-chrome.test.ts
__tests__/unit/homepage-demo-accessibility.test.ts
__tests__/unit/linkified-text.test.ts
__tests__/unit/loom-import-ui.test.ts
__tests__/unit/media-player-store-refs.test.ts
__tests__/unit/seo-demo-videos.test.ts
__tests__/unit/signed-baa-card.test.ts
__tests__/unit/summary-editor.test.ts
__tests__/unit/sso-login-pages.test.ts
- name: Typecheck
run: bun run typecheck
mobile:
name: Mobile
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/setup-js
- name: Check Expo dependencies
env:
EXPO_OFFLINE: "1"
run: bun run --cwd apps/mobile expo install --check
- name: Run Expo Doctor
env:
EXPO_OFFLINE: "1"
working-directory: apps/mobile
run: bunx expo-doctor@1.20.1
- name: Typecheck
run: bun run --cwd apps/mobile typecheck
- name: Test
run: bun run --cwd apps/mobile test
format-biome:
name: Format (Biome)
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
# Don't use `latest` as Biome throws an error when it doesn't match the
# schema version in the config file.
version: 2.2.0
- name: Run Biome
run: biome ci . --linter-enabled=false
format-rust:
name: Format (Cargo)
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --check
clippy:
name: Clippy
needs: changes
if: needs.changes.outputs.rust == 'true'
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
settings:
- target: aarch64-apple-darwin
runner: blacksmith-6vcpu-macos-15
- target: x86_64-pc-windows-msvc
runner: blacksmith-8vcpu-windows-2025
runs-on: ${{ matrix.settings.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Rust setup
uses: dtolnay/rust-toolchain@1.88.0
with:
targets: ${{ matrix.settings.target }}
components: clippy
- uses: ./.github/actions/setup-rust-cache
with:
target: ${{ matrix.settings.target }}
prefix-key: v1-rust-clippy
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: Run setup
shell: bash
run: node scripts/setup.js
env:
RUST_TARGET_TRIPLE: ${{ matrix.settings.target }}
- name: Test desktop installation and storage helpers
shell: bash
run: cargo test --locked -p cap-utils -p cap-cli-install --lib
# cap-desktop is the Tauri app, which no longer ships; Cap is the GPUI app
# plus the cap-muxer and cap-cli sidecars built from this workspace.
- name: Run Clippy
run: cargo clippy --workspace --exclude cap-desktop --all-features --locked -- -D warnings
lint-biome:
name: Lint (Biome)
runs-on: blacksmith-8vcpu-ubuntu-2404
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
run: biome ci . || true
rust-tests:
name: Rust tests (Linux)
needs: changes
if: needs.changes.outputs.rust == 'true'
timeout-minutes: 60
runs-on: blacksmith-8vcpu-ubuntu-2404
env:
RUST_TARGET_TRIPLE: x86_64-unknown-linux-gnu
LD_LIBRARY_PATH: ${{ github.workspace }}/target/native-deps/lib:${{ github.workspace }}/target/debug
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Linux desktop dependencies
uses: ./.github/actions/install-desktop-deps
- name: Rust setup
uses: dtolnay/rust-toolchain@1.88.0
- uses: ./.github/actions/setup-rust-cache
with:
target: x86_64-unknown-linux-gnu
prefix-key: v1-rust-tests
save-cache: ${{ github.ref == 'refs/heads/main' }}
- name: Run setup
run: node scripts/setup.js
- name: Test desktop regressions
run: |
cargo test --locked -p cap-utils -p cap-cli-install --lib
cargo test --locked -p cap --bin cap record::tests
cargo test --locked -p cap-recording --lib -- --test-threads=1
cargo test --locked -p cap-recording --test x11_shm_capture -- --test-threads=1
cargo test --locked -p cap-enc-ffmpeg
build-gpui:
name: Build GPUI Desktop
needs: changes
if: needs.changes.outputs.gpui == 'true'
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
settings:
- target: aarch64-apple-darwin
runner: blacksmith-6vcpu-macos-15
# Cap still ships an Intel build, and Blacksmith has no Intel Macs.
- target: x86_64-apple-darwin
runner: macos-26-intel
- target: x86_64-pc-windows-msvc
runner: blacksmith-8vcpu-windows-2025
- target: x86_64-unknown-linux-gnu
runner: blacksmith-8vcpu-ubuntu-2404
runs-on: ${{ matrix.settings.runner }}
env:
# Full debuginfo for the opt-level 2 dependency tree is most of the
# target dir and the link time, and nothing in CI reads it.
CARGO_PROFILE_DEV_DEBUG: "0"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Test desktop build preparation
run: node --test scripts/prepare-gpui-dependency.test.mjs scripts/build-macos-packages.test.mjs scripts/bundle-gpui.test.mjs scripts/finalize-macos-packages.test.mjs
- name: Test Linux packaging
if: ${{ runner.os == 'Linux' }}
run: node --test scripts/linux-bundle-config.test.mjs scripts/finalize-linux-appimage.test.mjs scripts/finalize-linux-gpui-packages.test.mjs
- name: Install Linux desktop dependencies
if: ${{ runner.os == 'Linux' }}
uses: ./.github/actions/install-desktop-deps
- name: Rust setup
uses: dtolnay/rust-toolchain@1.95.0
with:
targets: ${{ matrix.settings.target }}
- uses: ./.github/actions/setup-rust-cache
with:
target: ${{ matrix.settings.target }}
prefix-key: v1-rust-gpui
save-cache: ${{ github.ref == 'refs/heads/main' }}
workspaces: apps/desktop-gpui -> target
- name: Run setup
shell: bash
run: node scripts/setup.js
env:
RUST_TARGET_TRIPLE: ${{ matrix.settings.target }}
# The test build compiles every line the binary build does (the app has
# no cfg(not(test)) code), so a separate binary build only repeated the
# app crate's compile and link. Release builds still produce the binary.
- name: Prepare GPUI dependency
shell: bash
run: |
node scripts/sync-desktop-versions.mjs
./scripts/prepare-gpui-dependency.sh
- name: Test GPUI desktop
shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
debug_path="$(cygpath "$GITHUB_WORKSPACE/target/debug")"
export PATH="$debug_path:$PATH"
elif [[ "$RUNNER_OS" == "macOS" ]]; then
frameworks="$GITHUB_WORKSPACE/apps/desktop-gpui/target/${{ matrix.settings.target }}/debug/Frameworks"
mkdir -p "$frameworks"
ln -sfn "$GITHUB_WORKSPACE/target/Frameworks/Spacedrive.framework" "$frameworks/Spacedrive.framework"
elif [[ "$RUNNER_OS" == "Linux" ]]; then
export LD_LIBRARY_PATH="$GITHUB_WORKSPACE/target/native-deps/lib:$GITHUB_WORKSPACE/target/debug:$GITHUB_WORKSPACE/target/${{ matrix.settings.target }}/debug${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
fi
if [[ "$RUNNER_OS" == "Linux" ]]; then
xvfb-run -a --server-args="-screen 0 1920x1080x24 -noreset" \
cargo +1.95.0 test --manifest-path apps/desktop-gpui/Cargo.toml --locked --target ${{ matrix.settings.target }} --bin cap-gpui
else
cargo +1.95.0 test --manifest-path apps/desktop-gpui/Cargo.toml --locked --target ${{ matrix.settings.target }} --bin cap-gpui
fi
cargo +1.95.0 test --manifest-path apps/desktop-gpui/Cargo.toml --locked --target ${{ matrix.settings.target }} -p cap-gpui-kernels
tauri-plugins:
name: Verify Tauri plugin versions
runs-on: blacksmith-8vcpu-ubuntu-2404
needs: changes
if: needs.changes.outputs.tauri-plugins == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: ./.github/actions/setup-js
- name: Run verify
shell: bash
run: node scripts/check-tauri-plugin-versions.js