Skip to content

Commit 0378ae1

Browse files
committed
ci: scratch camera preview downscale A/B
1 parent 5a318b4 commit 0378ae1

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
name: Scratch camera preview downscale A/B
2+
on:
3+
push:
4+
branches: [ci/camera-preview-downscale-ab]
5+
jobs:
6+
macos:
7+
runs-on: blacksmith-6vcpu-macos-26
8+
timeout-minutes: 120
9+
env:
10+
CARGO_PROFILE_DEV_DEBUG: "0"
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
- uses: dtolnay/rust-toolchain@1.95.0
16+
with:
17+
targets: aarch64-apple-darwin
18+
- uses: ./.github/actions/setup-rust-cache
19+
with:
20+
target: aarch64-apple-darwin
21+
prefix-key: v1-rust-gpui-macos26-scratch
22+
save-cache: "true"
23+
workspaces: apps/desktop-gpui -> target
24+
- name: Setup
25+
shell: bash
26+
run: node scripts/setup.js
27+
env:
28+
RUST_TARGET_TRIPLE: aarch64-apple-darwin
29+
- name: Prepare GPUI dependency
30+
shell: bash
31+
run: |
32+
node scripts/sync-desktop-versions.mjs
33+
./scripts/prepare-gpui-dependency.sh
34+
- name: Frameworks
35+
shell: bash
36+
run: |
37+
frameworks="$GITHUB_WORKSPACE/apps/desktop-gpui/target/aarch64-apple-darwin/debug/Frameworks"
38+
mkdir -p "$frameworks"
39+
ln -sfn "$GITHUB_WORKSPACE/target/Frameworks/Spacedrive.framework" "$frameworks/Spacedrive.framework"
40+
- name: Kernel tests
41+
run: cargo +1.95.0 test --manifest-path apps/desktop-gpui/Cargo.toml --locked --target aarch64-apple-darwin -p cap-gpui-kernels camera_preview
42+
- name: Bubble A/B
43+
shell: bash
44+
run: |
45+
sw_vers
46+
sysctl -n machdep.cpu.brand_string
47+
cargo +1.95.0 run --manifest-path apps/desktop-gpui/Cargo.toml --locked --target aarch64-apple-darwin \
48+
--config 'profile.dev.package.cap-desktop-gpui.opt-level=2' \
49+
--example camera-preview-convert-benchmark -- --bubble | tee "$RUNNER_TEMP/bubble.md"
50+
cat "$RUNNER_TEMP/bubble.md" >> "$GITHUB_STEP_SUMMARY"
51+
portable:
52+
strategy:
53+
fail-fast: false
54+
matrix:
55+
settings:
56+
- target: x86_64-unknown-linux-gnu
57+
runner: blacksmith-8vcpu-ubuntu-2404
58+
- target: x86_64-pc-windows-msvc
59+
runner: blacksmith-8vcpu-windows-2025
60+
runs-on: ${{ matrix.settings.runner }}
61+
timeout-minutes: 120
62+
env:
63+
CARGO_PROFILE_DEV_DEBUG: "0"
64+
steps:
65+
- uses: actions/checkout@v4
66+
with:
67+
persist-credentials: false
68+
- name: Install Linux desktop dependencies
69+
if: ${{ runner.os == 'Linux' }}
70+
uses: ./.github/actions/install-desktop-deps
71+
- uses: dtolnay/rust-toolchain@1.95.0
72+
with:
73+
targets: ${{ matrix.settings.target }}
74+
- uses: ./.github/actions/setup-rust-cache
75+
with:
76+
target: ${{ matrix.settings.target }}
77+
prefix-key: v1-rust-gpui
78+
workspaces: apps/desktop-gpui -> target
79+
- name: Setup
80+
shell: bash
81+
run: node scripts/setup.js
82+
env:
83+
RUST_TARGET_TRIPLE: ${{ matrix.settings.target }}
84+
- name: Prepare GPUI dependency
85+
shell: bash
86+
run: |
87+
node scripts/sync-desktop-versions.mjs
88+
./scripts/prepare-gpui-dependency.sh
89+
- name: Preview scale A/B
90+
shell: bash
91+
run: |
92+
if [[ "$RUNNER_OS" == "Windows" ]]; then
93+
debug_path="$(cygpath "$GITHUB_WORKSPACE/target/debug")"
94+
export PATH="$debug_path:$PATH"
95+
else
96+
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}"
97+
fi
98+
cargo +1.95.0 test --manifest-path apps/desktop-gpui/Cargo.toml --locked --target ${{ matrix.settings.target }} --bin cap-gpui camera_preview -- --include-ignored --nocapture --test-threads 1 | tee "$RUNNER_TEMP/scale.md"
99+
grep '^|' "$RUNNER_TEMP/scale.md" >> "$GITHUB_STEP_SUMMARY"

0 commit comments

Comments
 (0)