forked from manaflow-ai/cmux
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (74 loc) · 2.74 KB
/
test-gpu.yml
File metadata and controls
87 lines (74 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: GPU Smoke Test (Self-Hosted)
on:
# SECURITY: Only trigger on direct pushes and manual dispatch.
# Never run on pull_request — fork PRs could execute arbitrary code
# on the self-hosted runner with GPU access.
push:
branches: [main, 'sid/**']
paths:
- 'cmux-linux/**'
- 'ghostty'
- '.github/workflows/test-gpu.yml'
workflow_dispatch:
inputs:
ref:
description: Branch or SHA to test
required: false
default: ""
test_timeout:
description: "Smoke test timeout in seconds"
required: false
default: "15"
concurrency:
group: test-gpu-${{ github.ref }}
cancel-in-progress: true
jobs:
gpu-smoke:
name: GPU smoke test (cmux-nix)
runs-on: cmux-nix
# Require approval via GitHub Environment protection rules.
environment: gpu-tests
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
with:
ref: ${{ inputs.ref || github.ref }}
submodules: recursive
- name: Setup GloriousFlywheel
uses: tinyland-inc/GloriousFlywheel/.github/actions/setup-flywheel@main
- name: Configure self-hosted Nix
run: bash scripts/configure-self-hosted-nix.sh
- name: Verify runner Nix daemon
run: |
nix --version
nix store info --store daemon
- name: Strip non-version tags from ghostty
run: git -C ghostty tag -l 'xcframework-*' | xargs git -C ghostty tag -d 2>/dev/null || true
- name: GPU info
run: |
echo "=== GPU devices ==="
ls -la /dev/dri/ || echo "No DRI devices"
echo "=== Vulkan info ==="
vulkaninfo --summary 2>/dev/null | head -20 || echo "vulkaninfo not available"
- name: Build libghostty (Nix)
run: |
nix --store daemon develop --command bash -c 'cd ghostty && zig build -Dapp-runtime=none -Drenderer=opengl -Doptimize=ReleaseFast'
bash scripts/ghostty-compat-symlinks.sh
ls -lh ghostty/zig-out/lib/libghostty.*
- name: Build cmux-linux (Nix)
run: nix --store daemon develop --command bash -c 'cd cmux-linux && zig build -Doptimize=ReleaseFast && ls -lh zig-out/bin/cmux'
- name: Test config parser (Nix)
run: nix --store daemon develop --command bash -c 'cd cmux-linux && zig build test'
- name: GPU smoke test
env:
SMOKE_TIMEOUT: ${{ inputs.test_timeout || '15' }}
run: nix --store daemon develop --command bash scripts/smoke-test-gpu.sh "$SMOKE_TIMEOUT"
- name: Upload crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: gpu-crash-logs
path: |
/tmp/cmux-gpu-stderr.log
/tmp/core.*
retention-days: 7