Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(ci): provide a virtual display for Linux GPUI tests

Richie McIlroye73a263739ba
diff --git a/.github/actions/install-desktop-deps/action.yml b/.github/actions/install-desktop-deps/action.yml
index 3658462e1..50f85262e 100644
--- a/.github/actions/install-desktop-deps/action.yml
+++ b/.github/actions/install-desktop-deps/action.yml
@@ -47,4 +47,6 @@ runs:
libxkbcommon-dev \
libxkbcommon-x11-dev \
libva-dev \
+ xvfb \
+ xauth \
patchelf
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b36f13812..f78f76d17 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -295,7 +295,12 @@ jobs:
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
- cargo +1.95.0 test --manifest-path apps/desktop-gpui/Cargo.toml --locked --target ${{ matrix.settings.target }} --bin cap-gpui
+ if [[ "$RUNNER_OS" == "Linux" ]]; then
+ xvfb-run -a --server-args="-screen 0 1920x1080x24" \
+ 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
- name: Build app
working-directory: apps/desktop