Skip to content

chore(main): release sandbox 0.5.0 (#3676) #1

chore(main): release sandbox 0.5.0 (#3676)

chore(main): release sandbox 0.5.0 (#3676) #1

Workflow file for this run

name: "CI: Rust Linux unit"
on:
pull_request:
paths:
- "libs/cua-driver/rust/.cargo/**"
- "libs/cua-driver/rust/Cargo.toml"
- "libs/cua-driver/rust/Cargo.lock"
- "libs/cua-driver/rust/crates/cua-driver/**"
- "libs/cua-driver/rust/crates/cua-driver-contract/**"
- "libs/cua-driver/rust/crates/cua-driver-core/**"
- "libs/cua-driver/rust/crates/cua-driver-testkit/**"
- "libs/cua-driver/rust/crates/cursor-overlay/**"
- "libs/cua-driver/rust/crates/pip-preview/**"
- "libs/cua-driver/rust/crates/platform-linux/**"
- "libs/cua-driver/wayland-helper/**"
- "libs/cua-driver/tests/fixtures/**"
- "scripts/ci/linux/test-pacman-updates.sh"
- "nix/**"
- "flake.nix"
- "flake.lock"
- ".github/workflows/ci-rust-linux.yml"
push:
branches: [main]
paths:
- "libs/cua-driver/rust/.cargo/**"
- "libs/cua-driver/rust/Cargo.toml"
- "libs/cua-driver/rust/Cargo.lock"
- "libs/cua-driver/rust/crates/cua-driver/**"
- "libs/cua-driver/rust/crates/cua-driver-contract/**"
- "libs/cua-driver/rust/crates/cua-driver-core/**"
- "libs/cua-driver/rust/crates/cua-driver-testkit/**"
- "libs/cua-driver/rust/crates/cursor-overlay/**"
- "libs/cua-driver/rust/crates/pip-preview/**"
- "libs/cua-driver/rust/crates/platform-linux/**"
- "libs/cua-driver/wayland-helper/**"
- "libs/cua-driver/tests/fixtures/**"
- "scripts/ci/linux/test-pacman-updates.sh"
- "nix/**"
- "flake.nix"
- "flake.lock"
- ".github/workflows/ci-rust-linux.yml"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-rust-linux-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pacman:
name: Arch native pacman updates
runs-on: ubuntu-latest
container: archlinux:base-devel
timeout-minutes: 30
defaults:
run:
shell: bash
steps:
- name: Install Arch build and test dependencies
run: |
pacman -Syu --noconfirm --needed git rust clang pkgconf jq \
dbus libx11 libxi libxtst libxext libxkbcommon wayland \
xorg-server-xvfb xorg-xauth at-spi2-core
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
key: arch-pacman
- name: Build exact candidate and native package tests
working-directory: libs/cua-driver/rust
run: |
set -euo pipefail
cargo test -p cua-driver --test release_channel_cli_test --no-run \
--locked --features portal-input --message-format=json > pacman-build.jsonl
test_binary=$(jq -r 'select(.reason == "compiler-artifact" and .target.name == "release_channel_cli_test" and .executable != null) | .executable' pacman-build.jsonl)
test -x "$test_binary"
echo "PACMAN_TEST_BINARY=$test_binary" >> "$GITHUB_ENV"
- name: Verify real pacman ownership through CLI and MCP
env:
CUA_E2E_UNRESTRICTED_GUI: "1"
EXPECTED_SOURCE_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
set -euo pipefail
CUA_E2E_SOURCE_SHA=$(git -c safe.directory="$GITHUB_WORKSPACE" rev-parse HEAD)
test "$CUA_E2E_SOURCE_SHA" = "$EXPECTED_SOURCE_SHA"
export CUA_E2E_SOURCE_SHA
xvfb-run -a dbus-run-session -- env CUA_PACMAN_TEST_DISPOSABLE=1 \
bash scripts/ci/linux/test-pacman-updates.sh \
libs/cua-driver/rust/target/debug/cua-driver "$PACMAN_TEST_BINARY" \
pacman-update-evidence
- name: Upload native package evidence
if: always()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: pacman-update-evidence
if-no-files-found: error
path: |
pacman-update-evidence/*.log
pacman-update-evidence/*.txt
libs/cua-driver/rust/pacman-build.jsonl
unit:
name: Rust Linux unit and compile
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Verify shared fixture scroll journal
run: node --test libs/cua-driver/tests/fixtures/shared/web/journal.test.cjs
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
with:
workspaces: "libs/cua-driver/rust -> target"
- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
clang pkg-config libdbus-1-dev libpipewire-0.3-dev libspa-0.2-dev \
libei-dev libxkbcommon-dev libx11-dev libxi-dev libxtst-dev libxext-dev \
imagemagick xvfb xauth x11-utils ffmpeg
- name: Run Linux Rust tests
working-directory: libs/cua-driver/rust
run: cargo test -p cua-driver -p cua-driver-contract -p cua-driver-core -p cua-driver-testkit -p cursor-overlay -p cursor-theme-cli -p platform-linux --all-targets --locked
- name: Verify final-frame extraction without a desktop
working-directory: libs/cua-driver/rust
run: |
cargo test -p cua-driver --test e2e_environment_preflight_test --locked -- \
--ignored --exact last_frame_extraction_handles_long_final_duration_and_invalid_input --nocapture
- name: Run X11 overlay click-through regression
working-directory: libs/cua-driver/rust
run: |
xvfb-run -a --server-args="-screen 0 1920x1080x24" \
cargo test -p platform-linux \
x11_overlay_input_shape_stays_empty_and_clicks_pass_through_after_resize \
--locked -- --ignored --nocapture
xvfb-run -a --server-args="-screen 0 1920x1080x24" \
cargo test -p platform-linux \
x11_overlay_owner_stays_click_through_across_cursor_lifecycle_and_randr \
--locked -- --ignored --nocapture
- name: Run X11 MIT-SHM capture correctness and performance regression
working-directory: libs/cua-driver/rust
run: |
set -euo pipefail
Xvfb :98 -screen 0 1920x1080x24 -ac -noreset -nolisten tcp >xvfb-98.log 2>&1 &
xvfb_primary=$!
Xvfb :99 -screen 0 1920x1080x24 -ac -noreset -nolisten tcp >xvfb-99.log 2>&1 &
xvfb_secondary=$!
trap 'kill "$xvfb_primary" "$xvfb_secondary" 2>/dev/null || true' EXIT
for display in :98 :99; do
ready=false
for _ in $(seq 1 50); do
if DISPLAY="$display" xdpyinfo >/dev/null 2>&1; then
ready=true
break
fi
sleep 0.1
done
if [ "$ready" != true ]; then
echo "Xvfb failed to become ready on $display" >&2
exit 1
fi
done
source_sha=$(git rev-parse HEAD)
{
echo "source_sha=$source_sha"
DISPLAY=:98 CUA_X11_SECOND_DISPLAY=:99 CUA_X11_RESTART_DISPLAY=:100 \
cargo test -p platform-linux \
capture::tests::live_xshm_matches_xgetimage_across_resize_reconnect_and_repetition \
--locked -- --ignored --exact --nocapture --test-threads=1
} 2>&1 | tee x11-capture-evidence.log
kill "$xvfb_primary" "$xvfb_secondary" 2>/dev/null || true
wait "$xvfb_primary" "$xvfb_secondary" || true
trap - EXIT
sha256sum x11-capture-evidence.log xvfb-98.log xvfb-99.log >x11-capture-evidence.sha256
- name: Upload X11 capture evidence
if: always()
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4
with:
name: x11-capture-evidence
if-no-files-found: error
path: |
libs/cua-driver/rust/x11-capture-evidence.log
libs/cua-driver/rust/x11-capture-evidence.sha256
libs/cua-driver/rust/xvfb-98.log
libs/cua-driver/rust/xvfb-99.log
- name: Run real uinput device-name regression
working-directory: libs/cua-driver/rust
run: |
sudo modprobe uinput
test -c /dev/uinput
sudo chmod a+rw /dev/uinput
cargo test -p platform-linux real_uinput_accepts_normalized_overlong_multibyte_name --locked -- --ignored --nocapture
- name: Compile portable GNOME/KDE portal input
working-directory: libs/cua-driver/rust
run: cargo check -p cua-driver --features portal-input --locked