forked from skullernet/q2pro
-
Notifications
You must be signed in to change notification settings - Fork 5
306 lines (261 loc) · 8.35 KB
/
build.yml
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
294
295
296
297
298
299
300
301
302
303
304
305
306
name: build
on:
push:
branches: [master, aqtion, aqtion-alpha, ci]
pull_request:
branches: [master, aqtion, aqtion-alpha]
env:
MESON_ARGS: >-
--auto-features=enabled
--fatal-meson-warnings
-Danticheat-server=true
-Davcodec=disabled
-Dclient-gtv=true
-Dpacketdup-hack=true
-Dtests=false
-Dvariable-fps=true
-Dwerror=false
-Daqtion-build=true
-Ddiscord-sdk=true
MESON_ARGS_WIN: >-
-Dsdl2=disabled
-Dwayland=disabled
-Dwrap_mode=forcefallback
-Dx11=disabled
MESON_ARGS_LINUX_WAYLAND: >-
-Dwindows-crash-dumps=disabled
-Dwrap_mode=nofallback
MESON_ARGS_LINUX_X11: >-
-Dwindows-crash-dumps=disabled
-Dwayland=disabled
-Dwrap_mode=nofallback
MESON_ARGS_MAC: >-
-Dwindows-crash-dumps=disabled
-Dwrap_mode=nofallback
-Dwayland=disabled
-Dx11=disabled
-Dicmp-errors=disabled
jobs:
mingw:
runs-on: ubuntu-latest
strategy:
matrix:
#arch: ["i686", "x86_64"]
arch: ["x86_64"]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: subprojects/packagecache
key: ${{ hashFiles('subprojects/*.wrap') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64 nasm python3-pip ninja-build
sudo python3 -m pip install meson
- name: Build
run: |
meson setup --cross-file=.ci/${{ matrix.arch }}-w64-mingw32.txt \
${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_WIN }} builddir
meson compile -vC builddir
- name: Generate Win Mingw archives
uses: actions/upload-artifact@v3
with:
name: q2pro-mingw-${{ matrix.arch }}
path: |
builddir/q2pro.exe
builddir/q2proded.exe
builddir/gamex86_64.dll
msvc:
runs-on: windows-latest
strategy:
matrix:
#arch: ["x86", "x64"]
arch: ["x64"]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: subprojects/packagecache
key: ${{ hashFiles('subprojects/*.wrap') }}
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- uses: ilammy/setup-nasm@v1
- name: Install dependencies
run: pip3 install --no-input meson ninja
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_WIN }} builddir
meson compile -C builddir
- name: Generate Win MSVC archives
uses: actions/upload-artifact@v3
with:
name: q2pro-msvc-${{ matrix.arch }}
path: |
builddir/q2pro.exe
builddir/q2proded.exe
builddir/gamex86_64.dll
linux64-x11:
runs-on: ubuntu-20.04
#runs-on: [self-hosted, x86]
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip libsdl2-dev libopenal-dev \
libpng-dev libjpeg-dev zlib1g-dev mesa-common-dev \
libcurl4-openssl-dev libx11-dev libxi-dev \
libavcodec-dev libavformat-dev libavutil-dev \
libswresample-dev libswscale-dev \
uuid-dev patchelf
pip3 install meson ninja
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_LINUX_X11 }} builddir
meson compile -C builddir
env:
CC: ${{ matrix.cc }}
- name: patchelf path to discord_game_sdk.so
run: |
patchelf --replace-needed /home/runner/work/q2pro/q2pro/extern/discord/lib/x86_64/discord_game_sdk.so ./discord_game_sdk.so builddir/q2pro
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Linux x64 archives
uses: actions/upload-artifact@v3
with:
name: q2pro-lin-${{ matrix.cc }}
path: |
builddir/q2pro
builddir/q2proded
builddir/gamex86_64.so
linux64-wayland:
runs-on: ubuntu-22.04
#runs-on: [self-hosted, x86]
strategy:
matrix:
cc: [gcc, clang]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson libsdl2-dev libopenal-dev \
libpng-dev libjpeg-dev zlib1g-dev mesa-common-dev \
libcurl4-openssl-dev libx11-dev libxi-dev \
libwayland-dev wayland-protocols libdecor-0-dev \
libavcodec-dev libavformat-dev libavutil-dev \
libswresample-dev libswscale-dev \
uuid-dev patchelf
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_LINUX_WAYLAND }} builddir
meson compile -C builddir
env:
CC: ${{ matrix.cc }}
- name: patchelf path to discord_game_sdk.so
run: |
patchelf --replace-needed /home/runner/work/q2pro/q2pro/extern/discord/lib/x86_64/discord_game_sdk.so ./discord_game_sdk.so builddir/q2pro
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Linux x64 archives
uses: actions/upload-artifact@v3
with:
name: q2pro-lin-wayland-${{ matrix.cc }}
path: |
builddir/q2pro
builddir/q2proded
builddir/gamex86_64.so
linuxARM64:
runs-on: [self-hosted, ARM64]
strategy:
matrix:
cc: [gcc]
steps:
- uses: actions/checkout@v2
# - name: Install dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y meson libsdl2-dev libopenal-dev \
# libpng-dev libjpeg-dev zlib1g-dev mesa-common-dev \
# libcurl4-gnutls-dev libx11-dev libxi-dev \
# libwayland-dev wayland-protocols libdecor-0-dev patchelf \
# libogg-dev libvorbis-dev
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_LINUX }} builddir
meson compile -vC builddir
env:
CC: ${{ matrix.cc }}
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Linux ARM archives
uses: actions/upload-artifact@v3
with:
name: q2pro-lin-arm64
path: |
builddir/q2pro
builddir/q2proded
builddir/gamearm.so
darwin:
runs-on: macos-latest
strategy:
matrix:
arch: [x86_64]
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install pkg-config meson libpng sdl2 openal-soft zlib curl ffmpeg jpeg-turbo
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_MAC }} builddir
meson compile -vC builddir
env:
CC: "gcc"
PKG_CONFIG_PATH: "/usr/local/opt/openal-soft/lib/pkgconfig"
CFLAGS: "-mmacosx-version-min=10.7"
- name: Set binaries as executable
run: |
chmod +x builddir/q2pro*
- name: Generate Mac archives
uses: actions/upload-artifact@v3
with:
name: q2pro-darwin-${{ matrix.arch }}
path: |
builddir/q2pro
builddir/q2proded
builddir/gamex86_64.dylib
# Github does not support Apple Silicon yet
# macARM64:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup Homebrew for ARM64 and dependencies
# run: |
# arch -arm64 brew install meson libpng jpeg sdl2 openal-soft zlib curl libvorbis
# - name: Build
# run: |
# meson setup ${{ env.MESON_ARGS }} builddir
# ninja -vC builddir
# env:
# CC: "gcc"
# PKG_CONFIG_PATH: "/opt/homebrew/Cellar/openal-soft/1.22.2/lib/pkgconfig/:/opt/homebrew/Cellar/jpeg/9e/lib/pkgconfig/"
# CFLAGS: "-target arm64-apple-macos11"
# - name: Set binaries as executable
# run: |
# chmod +x builddir/q2pro*
# - name: Generate Mac archives
# uses: actions/upload-artifact@v3
# with:
# name: q2pro-mac-arm64
# path: |
# builddir/q2pro
# builddir/q2proded