-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
268 lines (266 loc) · 9.87 KB
/
azure-pipelines.yml
File metadata and controls
268 lines (266 loc) · 9.87 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
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
jobs:
- job: ubuntu24
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-24.04'
steps:
- script: |
sudo apt update
sudo apt install --yes software-properties-common
wget --quiet https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
sudo dpkg --install packages-microsoft-prod.deb
sudo apt update
sudo apt install --yes \
cmake build-essential ninja-build ccache \
bison autoconf automake \
libpng-dev \
libjpeg-dev \
libgif-dev libfreetype-dev \
freeglut3-dev \
liblua5.2-dev libluabind-dev \
libogg-dev libvorbis-dev libopenal-dev \
libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev \
libmysqlclient-dev \
libxml2-dev \
libcurl4-openssl-dev libssl-dev \
libsquish-dev \
liblzma-dev \
libgsf-1-dev \
qtbase5-dev qttools5-dev qttools5-dev-tools \
libmsquic
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/msquic.h
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/msquic_posix.h
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/quic_sal_stub.h
sudo mv msquic.h msquic_posix.h quic_sal_stub.h /usr/include/
displayName: 'Dependencies'
- script: echo "##vso[task.setvariable variable=weekKey]$(date +%YW%V)"
displayName: 'Week key'
- task: Cache@2
inputs:
key: 'ccache | ubuntu24 | "$(weekKey)"'
path: '$(HOME)/.cache/ccache'
displayName: 'ccache cache'
- script: |
ccache --set-config=max_size=1G
ccache --set-config=compression=true
ccache -z
displayName: 'Configure ccache'
- script: >
cmake --preset linux-default
-DCMAKE_SUPPRESS_REGENERATION=ON
-DWITH_MSQUIC=ON
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DWITH_PCH=OFF
displayName: 'CMake'
- script: |
cat build/CMakeCache.txt
- script: |
cmake --build --preset release --target install
displayName: 'Make'
- script: ccache -s -v || ccache -s
displayName: 'ccache stats'
condition: always()
- script: |
ctest --preset default
displayName: 'Unit Tests'
- job: ubuntu22
timeoutInMinutes: 120
pool:
vmImage: 'ubuntu-22.04'
steps:
- script: |
sudo apt update
sudo apt install --yes software-properties-common
wget --quiet https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb
sudo dpkg --install packages-microsoft-prod.deb
sudo apt update
sudo apt install --yes \
build-essential ninja-build ccache \
bison autoconf automake \
libpng-dev \
libjpeg-dev \
libgif-dev libfreetype6-dev \
freeglut3-dev \
liblua5.2-dev libluabind-dev \
libogg-dev libvorbis-dev libopenal-dev \
libavcodec-dev libavformat-dev libavdevice-dev libswscale-dev libpostproc-dev \
libmysqlclient-dev \
libxml2-dev \
libcurl4-openssl-dev libssl-dev \
libsquish-dev \
liblzma-dev \
libgsf-1-dev \
qtbase5-dev qttools5-dev qttools5-dev-tools \
libmsquic
wget --output-document=/tmp/cmake.sh https://github.com/Kitware/CMake/releases/download/v3.31.11/cmake-3.31.11-linux-x86_64.sh
sudo mkdir -p /opt/cmake
sudo sh /tmp/cmake.sh --skip-license --prefix=/opt/cmake
sudo ln --symbolic --force /opt/cmake/bin/cmake /usr/local/bin/cmake
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/msquic.h
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/msquic_posix.h
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/quic_sal_stub.h
sudo mv msquic.h msquic_posix.h quic_sal_stub.h /usr/include/
displayName: 'Dependencies'
- script: echo "##vso[task.setvariable variable=weekKey]$(date +%YW%V)"
displayName: 'Week key'
- task: Cache@2
inputs:
key: 'ccache | ubuntu22 | "$(weekKey)"'
path: '$(HOME)/.cache/ccache'
displayName: 'ccache cache'
- script: |
ccache --set-config=max_size=1G
ccache --set-config=compression=true
ccache -z
displayName: 'Configure ccache'
- script: >
cmake --preset linux-default
-DCMAKE_SUPPRESS_REGENERATION=ON
-DWITH_MSQUIC=ON
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DWITH_PCH=OFF
displayName: 'CMake'
- script: |
cat build/CMakeCache.txt
- script: |
cmake --build --preset release --target install
displayName: 'Make'
- script: ccache -s -v || ccache -s
displayName: 'ccache stats'
condition: always()
- script: |
ctest --preset default
displayName: 'Unit Tests'
- job: client
strategy:
matrix:
ubuntu:
vmImage: 'ubuntu-24.04'
releaseName: 'Ubuntu24'
aptPackages: >-
libasound2-dev
libgl1-mesa-dev
libjack-dev
libpulse-dev
libxrandr-dev
libxrender-dev
libxxf86vm-dev
libmsquic
cmakeExtra: >-
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DWITH_PCH=OFF
win2022:
vmImage: 'windows-2022'
releaseName: 'Win64'
cmakeExtra: >-
-DWITH_DRIVER_DIRECT3D=ON
-DWITH_DRIVER_XAUDIO2=ON
-DDXSDK_DIR=C:/DXSDK
# TODO: Re-enable macOS when Hunter ships a PNG version compatible with Xcode 16+ (fp.h removed)
# macOS15:
# vmImage: 'macOS-15'
# releaseName: 'macOS'
# MACOSX_DEPLOYMENT_TARGET: 10.12
# cmakeExtra: >-
# -DWITH_LIBXML2_ICONV=OFF
# -DHUNTER_USE_CACHE_SERVERS=NO
# -GXcode
timeoutInMinutes: 120
pool:
vmImage: $(vmImage)
steps:
- checkout: self
fetchDepth: 0
- script: |
wget -q https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update
sudo apt remove -y man-db
sudo apt install -y --no-install-recommends ccache $(aptPackages)
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/msquic.h
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/msquic_posix.h
wget https://raw.githubusercontent.com/microsoft/msquic/main/src/inc/quic_sal_stub.h
sudo mv msquic.h /usr/include/msquic.h
sudo mv msquic_posix.h /usr/include/msquic_posix.h
sudo mv quic_sal_stub.h /usr/include/quic_sal_stub.h
displayName: '(ubuntu) Dependencies'
condition: eq(variables['Agent.JobName'], 'client ubuntu')
- script: echo "##vso[task.setvariable variable=weekKey]$(date +%YW%V)"
displayName: '(ubuntu) Week key'
condition: eq(variables['Agent.JobName'], 'client ubuntu')
- task: Cache@2
inputs:
key: 'ccache | client-ubuntu | "$(weekKey)"'
path: '$(HOME)/.cache/ccache'
displayName: '(ubuntu) ccache cache'
condition: eq(variables['Agent.JobName'], 'client ubuntu')
- script: |
ccache --set-config=max_size=1G
ccache --set-config=compression=true
ccache -z
displayName: '(ubuntu) Configure ccache'
condition: eq(variables['Agent.JobName'], 'client ubuntu')
- task: Cache@2
inputs:
key: 'dxsdk'
path: 'C:/DXSDK'
condition: contains(variables['cmakeExtra'], 'DIRECT3D=ON')
displayName: '(windows) DirectX SDK Cache'
- task: CmdLine@2
inputs:
script: |
IF NOT EXIST C:\DXSDK (
aria2c https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe
7z x DXSDK_Jun10.exe -oC:\ -r -y
del DXSDK_Jun10.exe
)
displayName: '(windows) DirectX SDK'
condition: contains(variables['cmakeExtra'], 'DIRECT3D=ON')
- task: Cache@2
inputs:
key: 'hunter | $(releaseName) | "$(Agent.OS)"'
path: '$(Pipeline.Workspace)/.hunter/_Base/Cache'
displayName: 'Hunter Cache'
- task: CMake@1
displayName: 'Configure'
inputs:
workingDirectory: $(Build.BinariesDirectory)
cmakeArgs: >-
$(cmakeExtra)
-DCMAKE_CONFIGURATION_TYPES=Release
-DFINAL_VERSION=OFF
-DHUNTER_CONFIGURATION_TYPES=Release
-DHUNTER_ENABLED=ON
-DHUNTER_ROOT=$(Pipeline.Workspace)/.hunter
-DWITH_DRIVER_OPENAL=ON
-DWITH_DRIVER_OPENGL=ON
-DWITH_DRIVER_OPENGL3=ON
-DWITH_INSTALL_LIBRARIES=OFF
-DWITH_NEL_SAMPLES=OFF
-DWITH_NEL_TESTS=OFF
-DWITH_NEL_TOOLS=OFF
-DWITH_RYZOM_CLIENT=ON
-DWITH_RYZOM_SERVER=OFF
-DWITH_RYZOM_TOOLS=OFF
$(Build.SourcesDirectory)
- task: CMake@1
displayName: 'Build'
inputs:
workingDirectory: $(Build.BinariesDirectory)
cmakeArgs: '--build . --config Release'
- script: ccache -s -v || ccache -s
displayName: '(ubuntu) ccache stats'
condition: and(always(), eq(variables['Agent.JobName'], 'client ubuntu'))
#- task: CMake@1
# displayName: 'Install'
# inputs:
# workingDirectory: $(Build.BinariesDirectory)
# cmakeArgs: --install . --config Release --prefix $(Build.StagingDirectory)
#- task: PublishPipelineArtifact@1
# inputs:
# targetPath: $(Build.StagingDirectory)/bin
# artifactName: RyzomClient$(releaseName)Release