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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
|
name: Validate
env:
XMAKE_VERSION: 2.9.9
WINDOWS_SDK_VERSION: 22621
XMAKE_GLOBALDIR: ${{ github.workspace }}/../.xmake_shared
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
on:
pull_request:
types:
- 'opened'
- 'reopened'
- 'synchronize'
branches:
- 'main'
paths-ignore:
- '*.md'
- 'LICENSE'
- '.gitignore'
- 'docs/**'
- 'VERSION.txt'
- '.github/workflows/create_release.yml'
- '.github/workflows/mirror_releases.yml'
- '.github/workflows/mirror.yml'
push:
branches:
- 'main'
paths-ignore:
- '*.md'
- 'LICENSE'
- '.gitignore'
- 'docs/**'
- 'VERSION.txt'
- '.github/workflows/create_release.yml'
- '.github/workflows/mirror_releases.yml'
- '.github/workflows/mirror.yml'
jobs:
clang-format:
name: Check clang-format
runs-on: [linux, x64, zen]
steps:
- uses: actions/checkout@v4
- name: clang-format
uses: ue-foundation/clang-format-action@epic-batching-v1
with:
clang-format-version: '13'
check-path: 'src'
windows-build:
name: Build & Test Windows
runs-on: [windows, x64, zen]
timeout-minutes: 25
strategy:
matrix:
config:
- 'debug'
- 'release'
arch:
- 'x64'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Trust workspace
run: git config --global --add safe.directory "${{ github.workspace }}"
- name: Setup xmake
uses: ue-foundation/[email protected]
with:
xmake-version: ${{env.XMAKE_VERSION}}
- name: Config
run: |
xmake config -vD -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes
- name: Clean reports
if: ${{ matrix.config == 'debug' }}
run: if (Test-Path build/reports) { Remove-Item -Recurse -Force build/reports }
- name: Build & Test
if: ${{ matrix.config == 'debug' }}
run: |
xmake test -v -y --junit
- name: Upload report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
uses: actions/upload-artifact@v3
with:
name: reports-win64
path: build/reports/*.xml
- name: Test Report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
uses: ue-foundation/test-reporter@v2
with:
name: Test Results (win64)
path: build/reports/*.xml
reporter: java-junit
list-tests: 'failed'
- name: Bundle
if: ${{ matrix.config == 'release' }}
run: |
xmake bundle -v -y --codesignidentity="Epic Games"
- name: Upload zenserver-win64
if: ${{ matrix.config == 'release' }}
uses: actions/upload-artifact@v3
with:
name: zenserver-win64
path: build/zenserver-win64.zip
linux-build:
name: Build & Test Linux
runs-on: [linux, x64, zen]
timeout-minutes: 25
strategy:
matrix:
config:
- 'debug'
- 'release'
arch:
- 'x86_64'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install UE Toolchain
run: |
rm -rf ./.tmp-ue-toolchain
./scripts/ue_build_linux/get_ue_toolchain.sh ./.tmp-ue-toolchain
- name: Setup xmake
uses: ue-foundation/[email protected]
with:
xmake-version: ${{env.XMAKE_VERSION}}
- name: Config
run: |
xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes --toolchain=ue-clang --sdk=${{ github.workspace }}/.tmp-ue-toolchain
- name: Clean reports
if: ${{ matrix.config == 'debug' }}
shell: bash
run: rm -rf build/reports
- name: Build & Test
if: ${{ matrix.config == 'debug' }}
run: |
xmake test -v -y --junit
- name: Upload report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
uses: actions/upload-artifact@v3
with:
name: reports-linux
path: build/reports/*.xml
- name: Test Report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
uses: ue-foundation/test-reporter@v2
with:
name: Test Results (linux)
path: build/reports/*.xml
reporter: java-junit
list-tests: 'failed'
- name: Bundle
if: ${{ matrix.config == 'release' }}
run: |
xmake bundle -v -y
- name: Upload zenserver-linux
if: ${{ matrix.config == 'release' }}
uses: actions/upload-artifact@v3
with:
name: zenserver-linux
path: build/zenserver-linux.zip
macos-build:
name: Build & Test MacOS
runs-on: [macos, x64, zen]
timeout-minutes: 25
strategy:
matrix:
config:
- 'debug'
- 'release'
arch:
- 'x86_64'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup xmake
uses: ue-foundation/[email protected]
with:
xmake-version: ${{env.XMAKE_VERSION}}
- name: Config
run: |
xmake config -v -y -m ${{ matrix.config }} --arch=${{ matrix.arch }} --zensentry=yes
- name: Clean reports
if: ${{ matrix.config == 'debug' }}
shell: bash
run: rm -rf build/reports
- name: Build & Test
if: ${{ matrix.config == 'debug' }}
run: |
xmake test -v -y --junit
- name: Upload report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
uses: actions/upload-artifact@v3
with:
name: reports-macos
path: build/reports/*.xml
- name: Test Report
if: ${{ (failure() || success()) && (matrix.config == 'debug') }}
uses: ue-foundation/test-reporter@v2
with:
name: Test Results (macos)
path: build/reports/*.xml
reporter: java-junit
list-tests: 'failed'
- name: Bundle
if: ${{ matrix.config == 'release' }}
run: |
xmake bundle -v -y --codesignidentity="Developer ID Application"
- name: Upload zenserver-macos
if: ${{ matrix.config == 'release' }}
uses: actions/upload-artifact@v3
with:
name: zenserver-macos
path: build/zenserver-macos.zip
docker-build:
name: Build Docker Images
runs-on: [linux, x64, zen]
timeout-minutes: 15
needs: [linux-build, windows-build]
steps:
- uses: actions/checkout@v4
- name: Download Linux bundle
uses: actions/download-artifact@v1
with:
name: zenserver-linux
path: artifacts/linux
- name: Download Windows bundle
uses: actions/download-artifact@v1
with:
name: zenserver-win64
path: artifacts/win64
- name: Extract binaries
run: |
mkdir -p build/linux/x86_64/release
unzip artifacts/linux/zenserver-linux.zip -d artifacts/linux-extracted
cp artifacts/linux-extracted/zenserver build/linux/x86_64/release/
mkdir -p build/win-binary-staging
unzip artifacts/win64/zenserver-win64.zip -d artifacts/win-extracted
cp artifacts/win-extracted/zenserver.exe build/win-binary-staging/
- name: Build Docker image (with Wine + Windows binary)
run: |
docker build \
-t zenserver-compute:latest \
--build-arg WIN_BINARY_DIR=build/win-binary-staging \
-f docker/Dockerfile .
- name: Build Docker image (Linux only, no Wine)
run: |
docker build \
-t zenserver-compute-linux:latest \
--build-arg INSTALL_WINE=false \
-f docker/Dockerfile .
|