-
-
Notifications
You must be signed in to change notification settings - Fork 32
124 lines (108 loc) · 4.04 KB
/
Copy pathtmp_win_test.yml
File metadata and controls
124 lines (108 loc) · 4.04 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: tmp Windows fresh build
on:
workflow_dispatch:
permissions:
contents: read
jobs:
fresh-build:
name: cargo xtask fresh-build --release
runs-on: windows-latest
timeout-minutes: 180
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_LOG: info
GSTREAMER_VERSION: 1.26.9
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install Rust toolchain (from rust-toolchain.toml)
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.95.0
- name: Restore GStreamer SDK cache
id: cache-gstreamer
uses: actions/cache/restore@v4
with:
path: |
C:\gstreamer
C:\gstreamer-msi-cache
key: windows-gstreamer-msvc-x86_64-${{ env.GSTREAMER_VERSION }}-v1
- name: Install GStreamer SDK
if: steps.cache-gstreamer.outputs.cache-hit != 'true'
shell: powershell
run: ./scripts/setup-windows-gstreamer.ps1 -Install
- name: Save GStreamer SDK cache
if: steps.cache-gstreamer.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
C:\gstreamer
C:\gstreamer-msi-cache
key: ${{ steps.cache-gstreamer.outputs.cache-primary-key }}
- name: Configure GStreamer SDK
shell: powershell
run: ./scripts/setup-windows-gstreamer.ps1
- name: Cache cargo registry and target
uses: Swatinem/rust-cache@v2
with:
shared-key: windows-msvc-x86_64
cache-bin: false
save-if: true
cache-on-failure: true
- name: Install NSIS
run: choco install nsis -y
- name: Add NSIS to PATH
shell: powershell
run: Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files (x86)\NSIS"
- name: Verify GStreamer pkg-config
shell: bash
run: source scripts/windows-gstreamer-env.sh --verify
- name: Run fresh build
shell: bash
timeout-minutes: 150
run: |
source scripts/windows-gstreamer-env.sh
cargo xtask fresh-build --release
- name: GUI smoke (launch, frame snapshot, PNG readback)
shell: bash
timeout-minutes: 10
run: |
set -x
source scripts/windows-gstreamer-env.sh
mkdir -p gui-artifacts
export NEOMACS_GUI_FRAME_SNAPSHOT_JSON="$PWD/gui-artifacts/snapshot.json"
export NEOMACS_GUI_FRAME_SNAPSHOT_TXT="$PWD/gui-artifacts/snapshot.txt"
export NEOMACS_GUI_STATE_JSON="$PWD/gui-artifacts/gui-state.json"
export NEOMACS_DEBUG_FIRST_FRAME_READBACK=1
export NEOMACS_DEBUG_SURFACE_READBACK=1
export NEOMACS_DEBUG_SURFACE_READBACK_PNG="$PWD/gui-artifacts/frame.png"
export RUST_BACKTRACE=1
# The fixture self-terminates after ~2s; watchdog guards a wgpu hang.
./target/release/neomacs.exe -Q -l neomacs-gui-tests/fixtures/startup-smoke.el \
> gui-artifacts/neomacs.log 2>&1 &
PID=$!
for _ in $(seq 1 60); do kill -0 "$PID" 2>/dev/null || break; sleep 1; done
kill "$PID" 2>/dev/null || taskkill //F //PID "$PID" 2>/dev/null || true
echo "=== artifacts ==="; ls -la gui-artifacts/ || true
echo "=== last of neomacs.log ==="; tail -60 gui-artifacts/neomacs.log || true
if [ -s gui-artifacts/snapshot.json ]; then
echo "SNAPSHOT OK ($(wc -c < gui-artifacts/snapshot.json) bytes)"
else
echo "NO FRAME SNAPSHOT PRODUCED - GUI did not render"; exit 1
fi
- name: Upload GUI smoke artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: windows-gui-smoke
path: gui-artifacts/
if-no-files-found: warn
- name: Run Windows package script
shell: bash
timeout-minutes: 20
run: |
source scripts/windows-gstreamer-env.sh
./scripts/package-windows-installer.sh --skip-build --no-smoke