-
Notifications
You must be signed in to change notification settings - Fork 362
254 lines (245 loc) · 7.96 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
name: build
on:
push:
workflow_call:
jobs:
TC-Eluna:
strategy:
fail-fast: false
matrix:
include:
- eluna: OFF
lua: lua52
- eluna: ON
lua: lua51
- eluna: ON
lua: lua52
- eluna: ON
lua: lua53
- eluna: ON
lua: lua54
- eluna: ON
lua: luajit
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
repository: ElunaLuaEngine/ElunaTrinityWotlk
- uses: actions/checkout@v4
with:
path: src/server/game/LuaEngine
- name: Dependencies
run: |
sudo apt-get update && sudo apt-get install -yq libboost-all-dev g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
- name: Setup
env:
ELUNA: ${{ matrix.eluna }}
LUA: ${{ matrix.lua }}
run: |
mkdir bin
cd bin
cmake ../ -DELUNA=$ELUNA -DLUA_VERSION=$LUA -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS=dynamic -DSERVERS=1 -DNOJEM=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
cd ..
- name: Build
run: |
cd bin
make -j 4 -k && make install
- name: Unit tests
run: |
cd bin
make test
- name: Check executables
run: |
cd bin/check_install/bin
./authserver --version
./worldserver --version
# Cata preservation project has been abandoned, so no need for further build checks on this project
# CataPres-Eluna:
# strategy:
# fail-fast: false
# matrix:
# eluna: [ON]
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: false
# repository: Niam5/ElunaCataPreservation
# - uses: actions/checkout@v4
# with:
# path: src/server/game/LuaEngine
# - name: Dependencies
# run: |
# sudo apt-get update && sudo apt-get install -yq libboost-all-dev
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
# - name: Setup
# env:
# ELUNA: ${{ matrix.eluna }}
# run: |
# mkdir bin
# cd bin
# cmake ../ -DELUNA=$ELUNA -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSERVERS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_CXX_FLAGS_DEBUG="-DNDEBUG" -DCMAKE_INSTALL_PREFIX=check_install -DBUILD_TESTING=1
# cd ..
# - name: Build
# run: |
# cd bin
# make -j 4 -k && make install
# - name: Unit tests
# run: |
# cd bin
# make test
# - name: Check executables
# run: |
# cd bin/check_install/bin
# ./bnetserver --version
# ./worldserver --version
# AC-Eluna:
# strategy:
# fail-fast: false
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: recursive
# repository: azerothcore/azerothcore-wotlk
# ref: 'master'
# - uses: actions/checkout@v4
# with:
# submodules: false
# repository: azerothcore/mod-eluna-lua-engine
# path: modules/mod-eluna-lua-engine
# - uses: actions/checkout@v4
# with:
# path: modules/mod-eluna-lua-engine/LuaEngine
# - name: Configure OS
# run: |
# # Copy paste of https://github.com/azerothcore/azerothcore-wotlk/blob/master/apps/ci/ci-install.sh
#
# cat >>conf/config.sh <<CONFIG_SH
# MTHREADS=4
# CWARNINGS=ON
# CDEBUG=OFF
# CTYPE=Release
# CSCRIPTS=static
# CUNIT_TESTS=ON
# CSERVERS=ON
# CTOOLS=ON
# CSCRIPTPCH=ON
# CCOREPCH=ON
# CCUSTOMOPTIONS='-DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"'
# DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
# DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
# DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';"
# CONFIG_SH
#
# time sudo apt-get update -y
# # time sudo apt-get upgrade -y
# time sudo apt-get install -y git lsb-release sudo ccache
# time ./acore.sh install-deps
#
# time sudo apt-get install -y clang-11
# echo "CCOMPILERC=\"clang-11\"" >> ./conf/config.sh
# echo "CCOMPILERCXX=\"clang++-11\"" >> ./conf/config.sh
# - name: Import db
# run: source ./apps/ci/ci-import-db.sh
# - name: Build
# run: source ./apps/ci/ci-compile.sh
# - name: Dry run
# run: source ./apps/ci/ci-worldserver-dry-run.sh
# - name: Check startup errors
# run: source ./apps/ci/ci-error-check.sh
mangos-Eluna:
strategy:
fail-fast: false
matrix:
eluna: [ON, OFF]
patch: [zero, one, two, three]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
repository: mangos${{ matrix.patch }}/server
ref: master
- uses: actions/checkout@v4
with:
path: src/game/LuaEngine
- name: Dependencies and Environment
run: |
sudo apt-get update -y
sudo apt-get install -y git make cmake clang libssl-dev libbz2-dev build-essential default-libmysqlclient-dev libace-dev
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang 100
- name: Configure
env:
ELUNA: ${{ matrix.eluna }}
run: |
test -d _build || mkdir _build
test -d _install || mkdir _install
cd _build
cmake .. -DCMAKE_INSTALL_PREFIX=../_install -DBUILD_TOOLS:BOOL=1 -DBUILD_MANGOSD:BOOL=1 -DBUILD_REALMD:BOOL=1 -DSOAP:BOOL=1 -DSCRIPT_LIB_ELUNA:BOOL=$ELUNA -DSCRIPT_LIB_SD3:BOOL=1 -DPLAYERBOTS:BOOL=0 -DUSE_STORMLIB:BOOL=1
- name: Build
run: |
cd _build
make -j 6
cmangos-Eluna:
strategy:
fail-fast: false
matrix:
eluna: [ON, OFF]
patch: [Classic, TBC, WotLK, Cata]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: false
repository: Niam5/Eluna-CMaNGOS-${{ matrix.patch }}
ref: master
- uses: actions/checkout@v4
with:
path: src/game/LuaEngine
- name: Dependencies and Environment
run: |
echo "CC=gcc-12" >> $GITHUB_ENV
echo "CXX=g++-12" >> $GITHUB_ENV
sudo apt-get update && sudo apt-get install -yq libboost-all-dev
- name: Configure
env:
ELUNA: ${{ matrix.eluna }}
run: |
mkdir bin
cd bin
cmake .. -DBUILD_ELUNA=$ELUNA -DCMAKE_INSTALL_PREFIX=install -DBUILD_PLAYERBOT=OFF -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/
cd ..
- name: Build
run: |
cd bin
make -j4
make install
vmangos-Eluna:
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
repository: Eluna-Ports/Eluna-VMaNGOS
ref: development
- uses: actions/checkout@v4
with:
path: src/modules/Eluna
- name: Dependencies
run: |
sudo apt-get -qq update
sudo apt-get -qq install build-essential cmake cppcheck git libace-dev libiberty-dev libmysql++-dev libssl-dev libtbb-dev make openssl
- name: Configure and Build
run: |
mkdir build
mkdir _install
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=../_install -DWITH_WARNINGS=0 -DUSE_EXTRACTORS=1
make -j2
make install