-
Notifications
You must be signed in to change notification settings - Fork 547
113 lines (105 loc) · 3.36 KB
/
ci-build.yaml
File metadata and controls
113 lines (105 loc) · 3.36 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
# Build on Ubuntu with GCC and Clang, plus a Windows Visual Studio build.
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.job_name }} (client build ${{ matrix.client_build }})
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
client_build:
- 5875
- 5464
- 5302
- 5086
- 4878
- 4695
- 4544
- 4449
os:
- ubuntu-24.04
- windows-2022
include:
- os: ubuntu-24.04
c_compiler: gcc
cxx_compiler: g++
job_name: Ubuntu GCC
- os: ubuntu-24.04
c_compiler: clang
cxx_compiler: clang++
install_clang: true
job_name: Ubuntu Clang
- os: windows-2022
job_name: Windows Visual Studio
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install Ubuntu build dependencies
if: matrix.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.install_clang
run: sudo apt install -y --no-install-recommends clang
- name: Build and install on Ubuntu
if: matrix.os == 'ubuntu-24.04'
run: |
set -euo pipefail
mkdir -p build _install
cd build
cmake ../ \
-DCMAKE_C_COMPILER="${{ matrix.c_compiler }}" \
-DCMAKE_CXX_COMPILER="${{ matrix.cxx_compiler }}" \
-DCMAKE_INSTALL_PREFIX="../_install" \
-DBUILD_EXTRACTORS=1 \
-DENABLE_MAILSENDER=1 \
-DSUPPORTED_CLIENT_BUILD="${{ matrix.client_build }}"
make -j"$(nproc)"
make install
- name: Build and install on Windows
if: matrix.os == 'windows-2022'
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 -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