-
Notifications
You must be signed in to change notification settings - Fork 565
185 lines (173 loc) · 5.64 KB
/
Copy pathci-build.yaml
File metadata and controls
185 lines (173 loc) · 5.64 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
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
# Build on Ubuntu with GCC and Clang, plus Windows Visual Studio and MinGW64
# builds.
name: CI Build
on:
push:
paths-ignore:
- '.github/ISSUE_TEMPLATE.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.github/workflows/development-db-dump.yaml'
- '.github/workflows/pr-sql-check.yaml'
- '.gitignore'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- 'sql/**'
pull_request:
paths-ignore:
- '.github/ISSUE_TEMPLATE.md'
- '.github/ISSUE_TEMPLATE/**'
- '.github/PULL_REQUEST_TEMPLATE.md'
- '.github/workflows/development-db-dump.yaml'
- '.github/workflows/pr-sql-check.yaml'
- '.gitignore'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- 'sql/**'
jobs:
build:
name: Build on ${{ matrix.config.job_name }} (client build ${{ matrix.client_build }})
runs-on: ${{ matrix.config.os }}
permissions:
contents: read
strategy:
matrix:
# Every supported client build is verified against Ubuntu GCC; the
# latest (1.12.1.5875) additionally runs against Ubuntu Clang, Windows
# Visual Studio, and Windows MinGW (added via include below).
client_build:
- 5875
- 5464
- 5302
- 5086
- 4878
- 4695
- 4544
- 4449
- 4375
config:
- os: ubuntu-24.04
c_compiler: gcc
cxx_compiler: g++
job_name: Ubuntu GCC
include:
- client_build: 5875
config:
os: ubuntu-24.04
c_compiler: clang
cxx_compiler: clang++
install_clang: true
job_name: Ubuntu Clang
- client_build: 5875
config:
os: macos-26
job_name: macOS Clang
- client_build: 5875
config:
os: windows-2022
job_name: Windows Visual Studio
- client_build: 5875
config:
os: windows-2022
job_name: Windows MinGW
use_mingw: true
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install Ubuntu build dependencies
if: matrix.config.os == 'ubuntu-24.04'
run: |
sudo apt update
sudo apt install -y --no-install-recommends \
build-essential \
cmake \
libcurl4-openssl-dev \
libmysqlclient-dev \
libssl-dev \
zlib1g-dev
- name: Install Clang compiler
if: matrix.config.install_clang
run: sudo apt install -y --no-install-recommends clang
- name: Install macOS build dependencies
if: matrix.config.os == 'macos-26'
run: brew install mysql-client
- name: Set up MSYS2 (MINGW64)
if: matrix.config.use_mingw
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
base-devel
git
mingw-w64-x86_64-cmake
mingw-w64-x86_64-curl
mingw-w64-x86_64-gcc
mingw-w64-x86_64-ninja
- name: Build and install on Ubuntu
if: matrix.config.os == 'ubuntu-24.04'
run: |
set -euo pipefail
mkdir -p build _install
cd build
cmake ../ \
-DCMAKE_C_COMPILER="${{ matrix.config.c_compiler }}" \
-DCMAKE_CXX_COMPILER="${{ matrix.config.cxx_compiler }}" \
-DCMAKE_INSTALL_PREFIX="../_install" \
-DBUILD_EXTRACTORS=1 \
-DENABLE_MAILSENDER=1 \
-DBUILD_WARNINGS_AS_ERROR=1 \
-DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}"
make -j"$(nproc)"
make install
- name: Build and install on macOS
if: matrix.config.os == 'macos-26'
run: |
set -euo pipefail
mkdir -p build _install
cd build
cmake ../ \
-DCMAKE_INSTALL_PREFIX="../_install" \
-DBUILD_EXTRACTORS=1 \
-DENABLE_MAILSENDER=1 \
-DBUILD_WARNINGS_AS_ERROR=1 \
-DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}"
make -j"$(sysctl -n hw.ncpu)"
make install
- name: Build and install on Windows (Visual Studio)
if: matrix.config.os == 'windows-2022' && !matrix.config.use_mingw
shell: bash # Windows runners default to PowerShell.
run: |
set -euo pipefail
# Build cURL.
cd "$GITHUB_WORKSPACE/dep/windows/optional_dependencies"
./curl_download_and_build.bat
# Build VMaNGOS.
cd "$GITHUB_WORKSPACE"
mkdir -p build
cd build
cmake ../ \
-DBUILD_EXTRACTORS=1 \
-DENABLE_MAILSENDER=1 \
-DBUILD_WARNINGS_AS_ERROR=1 \
-DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}" \
-G "Visual Studio 17 2022" \
-A x64
"/c/Program Files/Microsoft Visual Studio/2022/Enterprise/MSBuild/Current/Bin/MSBuild.exe" "MaNGOS.sln" //p:Platform=x64 //p:Configuration=Release //m
- name: Build and install on Windows (MinGW)
if: matrix.config.use_mingw
shell: msys2 {0}
run: |
set -euo pipefail
mkdir -p build
cd build
cmake ../ \
-DBUILD_EXTRACTORS=1 \
-DENABLE_MAILSENDER=1 \
-DBUILD_WARNINGS_AS_ERROR=1 \
-DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}" \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja
cmake --build . --parallel