-
Notifications
You must be signed in to change notification settings - Fork 190
147 lines (117 loc) · 4.84 KB
/
healthcheck-streaming.yml
File metadata and controls
147 lines (117 loc) · 4.84 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Check health of streaming
on:
workflow_dispatch:
push:
paths:
- ".github/workflows/healthcheck-streaming.yml"
pull_request:
paths:
- ".github/workflows/healthcheck-streaming.yml"
- "Common/**"
- "Frontend/**"
- "Signalling/**"
- "SignallingWebServer/**"
- "Extras/**"
permissions:
contents: read
jobs:
# Uncomment when we can Linux test to capture a non-black screenshot using software renderer.
# streaming-test-linux:
# if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
# runs-on: ubuntu-latest
# steps:
# - name: Checkout source code
# uses: actions/checkout@v3
# - name: Create results directory
# run: mkdir Extras/MinimalStreamTester/results
# - name: Launch stream test in docker containers
# uses: isbang/compose-action@v1.5.1
# with:
# compose-file: "Extras/MinimalStreamTester/docker-compose.yml"
# up-flags: "--build --abort-on-container-exit --exit-code-from tester"
# - name: Get short sha
# id: vars
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
# - name: Upload results
# uses: actions/upload-artifact@v4
# with:
# name: Results-${{ steps.vars.outputs.sha_short }}-Linux
# path: Extras/MinimalStreamTester/results
streaming-test-win:
if: github.repository == 'EpicGamesExt/PixelStreamingInfrastructure'
runs-on: windows-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Get node version
id: get_node_version
run: echo "node_version=$(cat NODE_VERSION)" >> $Env:GITHUB_OUTPUT
- uses: actions/setup-node@v4
with:
node-version: ${{ steps.get_node_version.outputs.node_version }}
- name: Download streamer
uses: robinraju/release-downloader@v1
with:
repository: 'EpicGamesExt/PixelStreamingInfrastructure'
tag: 'minimal-streamer-5.7'
fileName: 'Minimal-PixelStreamer-5.7-Win64-Development.7z'
- name: Extract streamer
run: 7z x -oStreamer Minimal-PixelStreamer-5.7-Win64-Development.7z
- name: Install dependencies
run: npm install
- name: Build Common
working-directory: Common
run: npm run build
- name: Build Signalling
working-directory: Signalling
run: npm run build
- name: Build Wilbur
working-directory: SignallingWebServer
run: npm run build
- name: Build Frontend lib
working-directory: Frontend/library
run: npm run build
- name: Build Frontend ui lib
working-directory: Frontend/ui-library
run: npm run build
- name: Build Frontend implementation
working-directory: Frontend/implementations/typescript
run: |
$Env:WEBPACK_OUTPUT_PATH='${{ github.workspace }}\www'
npm run build
- name: Prepare test
working-directory: Extras\MinimalStreamTester
run: |
npm install
npx playwright install --with-deps
npx playwright install chrome
- name: Run Signalling
working-directory: SignallingWebServer
# triple hyphen for npm script running issues. With double the arguments get mangled
run: Start-Process powershell.exe -ArgumentList "npm","run","start","---","--rest_api","--player_port 999","--http_root ${{ github.workspace }}\www"
- name: Run Streamer
working-directory: Streamer
run: Start-Process ".\Minimal\Binaries\Win64\Minimal-Cmd.exe" -ArgumentList "-warp","-dx12","-windowed","-resx=1920","-resy=720","-PixelStreamingURL=ws://localhost:8888","-RenderOffScreen","-AllowSoftwareRendering","-PixelStreamingEncoderCodec=vp8", "-Log=Minimal.log"
- name: Wait for signalling to come up
run: curl --fail-with-body --retry-all-errors --retry 10 --retry-delay 20 --retry-connrefused http://localhost:999/api/status
- name: Wait for streamer to come up
run: curl --fail-with-body --retry-all-errors --retry 10 --retry-delay 20 --retry-connrefused http://localhost:999/api/streamers/DefaultStreamer
- name: Output signalling logs
working-directory: SignallingWebServer
run: ls .\logs\ && cat .\logs\*.log
- name: Output streamer logs
working-directory: Streamer
run: ls ".\Minimal\" && Test-Path ".\Minimal\Saved\Logs\Minimal.log" && cat ".\Minimal\Saved\Logs\Minimal.log"
- name: Test if we can stream
working-directory: Extras\MinimalStreamTester
run: |
$Env:PIXELSTREAMING_URL = 'http://localhost:999'
npx playwright test
- name: Get short sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $Env:GITHUB_OUTPUT
- name: Upload results
uses: actions/upload-artifact@v4
with:
name: Results-${{ steps.vars.outputs.sha_short }}-Win
path: Extras\MinimalStreamTester\playwright-report