forked from skullernet/q2pro
-
Notifications
You must be signed in to change notification settings - Fork 0
192 lines (164 loc) · 5.15 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
name: build
on:
push:
branches: [rerelease-game, ci]
pull_request:
branches: [rerelease-game]
env:
MESON_ARGS: >-
--fatal-meson-warnings
-Danticheat-server=true
-Dpacketdup-hack=true
-Dtests=true
-Dwerror=true
-Davcodec=enabled
-Dlibcurl=enabled
-Dlibjpeg=enabled
-Dlibjpeg-turbo:jpeg-turbo=enabled
-Dlibpng=enabled
-Dopenal=enabled
-Dsoftware-sound=enabled
-Dzlib=enabled
MESON_ARGS_WIN: >-
-Dicmp-errors=enabled
-Dwrap_mode=forcefallback
-Dwindows-crash-dumps=enabled
MESON_ARGS_LINUX: >-
-Dwrap_mode=nofallback
--force-fallback-for=fmt,jsoncpp,libavcodec,libavformat,libavutil,libswresample,libswscale
-Dsdl2=enabled
-Dwayland=enabled
-Dx11=enabled
MESON_ARGS_MACOS: >-
-Dpkg_config_path=/opt/homebrew/opt/openal-soft/lib/pkgconfig
-Dwrap_mode=nofallback
--force-fallback-for=fmt,jsoncpp,libavcodec,libavformat,libavutil,libswresample,libswscale
MESON_ARGS_FREEBSD: >-
-Dwrap_mode=nofallback
--force-fallback-for=fmt,jsoncpp,libavcodec,libavformat,libavutil,libswresample,libswscale
jobs:
mingw:
runs-on: ubuntu-24.04
strategy:
matrix:
arch: ["i686", "x86_64"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v4
with:
path: subprojects/packagecache
key: ${{ hashFiles('subprojects/*.wrap') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-mingw-w64 g++-mingw-w64 nasm meson ninja-build
- name: Build
run: |
meson setup --cross-file=.ci/${{ matrix.arch }}-w64-mingw32.txt \
${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_WIN }} builddir
meson compile -C builddir
msvc:
runs-on: windows-latest
strategy:
matrix:
arch: ["x86", "x64"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/cache@v4
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
meson install -C builddir --tags runtime --destdir ${{ github.workspace }}/installdir
- name: Setup variables
uses: actions/github-script@v7
with:
script: core.exportVariable('GITHUB_SHA_SHORT', context.sha.substring(0, 7))
- name: Upload
uses: actions/upload-artifact@v4
with:
name: q2pro-rr-windows-${{ matrix.arch }}-${{env.GITHUB_SHA_SHORT}}
path: installdir/
linux:
runs-on: ubuntu-24.04
strategy:
matrix:
include:
- cc: gcc
cxx: g++
- cc: clang
cxx: clang++
steps:
- uses: actions/checkout@v4
with:
submodules: true
- 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
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_LINUX }} builddir
meson compile -C builddir
meson install -C builddir --tags runtime --destdir ${{ github.workspace }}/installdir
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
- name: Setup variables
uses: actions/github-script@v7
with:
script: core.exportVariable('GITHUB_SHA_SHORT', context.sha.substring(0, 7))
- name: Upload
uses: actions/upload-artifact@v4
with:
name: q2pro-rr-linux-${{ matrix.cc }}-x86_64-${{env.GITHUB_SHA_SHORT}}
path: installdir/
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
brew update
brew install meson sdl2 openal-soft libpng jpeg-turbo
- name: Build
run: |
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_MACOS }} builddir
meson compile -C builddir
freebsd:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
architecture: x86-64
version: '14.1'
run: |
sudo pkg update
sudo pkg install -y git meson pkgconf openal-soft \
sdl2 curl png jpeg-turbo libx11 libdecor evdev-proto wayland-protocols
meson setup ${{ env.MESON_ARGS }} ${{ env.MESON_ARGS_FREEBSD }} builddir
meson compile -C builddir