-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.gitlab-ci.yml
495 lines (430 loc) · 15.1 KB
/
.gitlab-ci.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
stages:
- build-libvlc
- build-unity-plugin
variables:
VLC_UWP_LLVM_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20240617101054
VLC_WIN_LLVM_IMAGE: registry.videolan.org/vlc-debian-llvm-msvcrt:20240617101054
VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20240402131352
VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android:20240522152555
.variables-trial: &variables-trial
ARGS_TRIAL: -Dwatermark=true
.base-template:
tags:
- docker
- amd64
stage: build-libvlc
artifacts:
paths:
- nightlies/*
expire_in: 2 weeks
.variables-windows-classic: &variables-windows-classic
PLATFORM: windows
CROSSFILE: windows-x86_64.txt
.variables-windows-uwp: &variables-windows-uwp
PLATFORM: uwp
# ANDROID
.variables-android-armv7: &variables-android-armv7
ANDROID_ABI: armeabi-v7a
.variables-android-armv8: &variables-android-armv8
ANDROID_ABI: arm64-v8a
.variables-android-x86: &variables-android-x86
ANDROID_ABI: x86
.variables-android-x86_64: &variables-android-x86_64
ANDROID_ABI: x86_64
.libvlc-android-common:
extends: .base-template
image:
name: $VLC_ANDROID_IMAGE
script: |
git clone https://code.videolan.org/videolan/vlc-android && cd vlc-android
git clone https://code.videolan.org/videolan/libvlcjni && cd libvlcjni
git clone https://code.videolan.org/videolan/vlc/ --depth=1
git apply ../../patches/no-libvlcjni-build.patch
cd ..
ANDROID_HOME=/sdk/android-sdk-linux ./buildsystem/compile.sh -l -b -r -a ${ANDROID_ABI}
artifacts:
paths:
- vlc-android/libvlcjni/libvlc/jni
- vlc-android/libvlcjni/vlc/include
- vlc-android/libvlcjni/libvlc/build/intermediates/aar_main_jar/release/classes.jar
.unity-android-common:
extends: .base-template
image:
name: $VLC_ANDROID_IMAGE
stage: build-unity-plugin
script:
- export PATH="$HOME/sandbox/bin:$PATH"
- PKG_CONFIG_PATH=./vlc-android/libvlcjni/libvlc/jni/pkgconfig/${ANDROID_ABI} meson setup --cross-file=cross/android-${ANDROID_ABI}-ndk25.txt build_android_${ANDROID_ABI} ${ARGS_TRIAL} --buildtype release
- ninja -C build_android_${ANDROID_ABI}
artifacts:
paths:
- vlc-android/libvlcjni/libvlc/jni/libs/${ANDROID_ABI}/libvlc.so
- vlc-android/libvlcjni/libvlc/jni/libs/${ANDROID_ABI}/libc++_shared.so
- vlc-android/libvlcjni/libvlc/build/intermediates/aar_main_jar/release/classes.jar
- build_android_${ANDROID_ABI}/PluginSource/libVLCUnityPlugin.so
# libvlc android
libvlc-android-armv7:
extends: .libvlc-android-common
variables: *variables-android-armv7
libvlc-android-armv8:
extends: .libvlc-android-common
variables: *variables-android-armv8
libvlc-android-x86:
extends: .libvlc-android-common
variables: *variables-android-x86
libvlc-android-x86_64:
extends: .libvlc-android-common
variables: *variables-android-x86_64
# unity android
unity-android-armv7:
extends: .unity-android-common
variables: *variables-android-armv7
dependencies:
- libvlc-android-armv7
unity-android-armv8:
extends: .unity-android-common
variables: *variables-android-armv8
dependencies:
- libvlc-android-armv8
unity-android-x86:
extends: .unity-android-common
variables: *variables-android-x86
dependencies:
- libvlc-android-x86
unity-android-x86_64:
extends: .unity-android-common
variables: *variables-android-x86_64
dependencies:
- libvlc-android-x86_64
unity-android-armv7-trial:
extends: .unity-android-common
variables:
<<: [*variables-android-armv7, *variables-trial]
dependencies:
- libvlc-android-armv7
unity-android-armv8-trial:
extends: .unity-android-common
variables:
<<: [*variables-android-armv8, *variables-trial]
dependencies:
- libvlc-android-armv8
# Windows Classic
.libvlc-win-common:
tags:
- docker
- amd64
stage: build-libvlc
script: |
git clone https://code.videolan.org/videolan/vlc/ && cd vlc
git apply ../patches/disable-activex.patch
if [[ $ARGS == *"-w"* ]]; then
echo "Applying the UWP specific patch"
git apply ../patches/uwp-plugins-path.patch
fi
extras/package/win32/build.sh $ARGS
after_script:
- mkdir nightlies
- cd ./vlc/$BUILD_FOLDER
- make package-win-strip
- rm -rf vlc-4.0.0-dev/lua/http
artifacts:
paths:
- vlc/${BUILD_FOLDER}/vlc-4.0.0-dev
- vlc/${BUILD_FOLDER}/_win32
expire_in: 2 weeks
variables:
WINE_SDK_PATH: /usr/include/wine/wine/windows/
.unity-win-common:
image:
name: $VLC_WIN_LLVM_IMAGE
tags:
- docker
- amd64
stage: build-unity-plugin
script:
- PKG_CONFIG_PATH=./vlc/${BUILD_FOLDER}/_win32/lib/pkgconfig meson setup build_${PLATFORM} --cross-file=cross/${CROSSFILE} ${ARGS_TRIAL} --buildtype release
- ninja -C build_${PLATFORM}
- mv build_${PLATFORM}/PluginSource/libVLCUnityPlugin-1.dll VLCUnityPlugin.dll
artifacts:
paths:
- VLCUnityPlugin.dll
expire_in: 2 weeks
libvlc-win-x86_64-debug:
extends: .libvlc-win-common
image:
name: $VLC_WIN_LLVM_IMAGE
variables:
ARGS: -c -z -d -x -a x86_64 -g l
ARTIFACT: vlc-4.0.0-dev-win64-debug.7z
BUILD_FOLDER: win64
libvlc-win-x86_64:
extends: .libvlc-win-common
image:
name: $VLC_WIN_LLVM_IMAGE
variables:
ARGS: -c -z -r -x -a x86_64 -i nope -g l
ARTIFACT: vlc-4.0.0-dev-win64.7z
BUILD_FOLDER: win64
libvlc-uwp-x64:
extends: .libvlc-win-common
image:
name: $VLC_UWP_LLVM_IMAGE
variables:
ARGS: -w -u -c -z -r -x -a x86_64 -i nope -S 0x0A000007 -g l
ARTIFACT: vlc-4.0.0-dev-win64.7z
BUILD_FOLDER: win64-uwp
libvlc-uwp-arm64:
extends: .libvlc-win-common
image:
name: $VLC_UWP_LLVM_IMAGE
variables:
ARGS: -w -u -c -z -r -x -a aarch64 -i nope -S 0x0A000007 -g l
ARTIFACT: vlc-4.0.0-dev-win64.7z
BUILD_FOLDER: winarm64-uwp
libvlc-uwp-x64-debug:
extends: .libvlc-win-common
image:
name: $VLC_UWP_LLVM_IMAGE
variables:
ARGS: -w -u -c -z -d -x -a x86_64 -S 0x0A000007 -g l
ARTIFACT: vlc-4.0.0-dev-win64-debug.7z
BUILD_FOLDER: win64-uwp
unity-plugin-windows:
extends: .unity-win-common
dependencies:
- libvlc-win-x86_64
variables:
<<: [*variables-windows-classic]
BUILD_FOLDER: win64
unity-plugin-windows-trial:
extends: .unity-win-common
dependencies:
- libvlc-win-x86_64
variables:
<<: [*variables-trial, *variables-windows-classic]
BUILD_FOLDER: win64
unity-plugin-uwp-x64:
extends: .unity-win-common
dependencies:
- libvlc-uwp-x64
variables:
<<: [*variables-windows-uwp]
BUILD_FOLDER: win64-uwp
CROSSFILE: uwp-x86_64.txt
unity-plugin-uwp-x64-trial:
extends: .unity-win-common
dependencies:
- libvlc-uwp-x64
variables:
<<: [*variables-trial, *variables-windows-uwp]
BUILD_FOLDER: win64-uwp
CROSSFILE: uwp-x86_64.txt
unity-plugin-uwp-arm64:
extends: .unity-win-common
dependencies:
- libvlc-uwp-arm64
variables:
<<: [*variables-windows-uwp]
BUILD_FOLDER: winarm64-uwp
CROSSFILE: uwp-arm64.txt
unity-plugin-uwp-arm64-trial:
extends: .unity-win-common
dependencies:
- libvlc-uwp-arm64
variables:
<<: [*variables-trial, *variables-windows-uwp]
BUILD_FOLDER: winarm64-uwp
CROSSFILE: uwp-arm64.txt
# libvlc mac
.variables-macos-x64: &variables-macos-x64
ARCH: x86_64
VLC_PATH: /Users/videolanci/sandbox/bin
.variables-macos-aarch64: &variables-macos-aarch64
ARCH: aarch64
VLC_PATH: /Users/videolanci/sandbox/bin
.libvlc-macos-common:
stage: build-libvlc
script:
- git clone https://code.videolan.org/videolan/vlc && cd vlc
- mkdir build && cd build
- ../extras/package/macosx/build.sh ${ARGS} -a ${ARCH}
# remove sym files
- rm -rf macos-install/lib/libvlc.dylib
- rm -rf macos-install/lib/libvlccore.dylib
- mv macos-install/lib/libvlc.12.dylib macos-install/lib/libvlc.dylib
- mv macos-install/lib/libvlccore.9.dylib macos-install/lib/libvlccore.dylib
artifacts:
paths:
- vlc/build/macos-install/include/*
- vlc/build/macos-install/libexec/*
- vlc/build/macos-install/lib/pkgconfig/*
- vlc/build/macos-install/lib/vlc/**/*.dylib
- vlc/build/macos-install/lib/libvlc.dylib
- vlc/build/macos-install/lib/libvlccore.dylib
expire_in: 2 weeks
variables:
ARGS: -i z -c -g l
libvlc-macos-x86_64:
extends: .libvlc-macos-common
variables: *variables-macos-x64
tags:
- monterey
- amd64
libvlc-macos-aarch64:
extends: .libvlc-macos-common
variables: *variables-macos-aarch64
tags:
- monterey
- macos-m1
# unity plugin mac
.unity-plugin-macos-common:
stage: build-unity-plugin
script:
# patch libvlc.pc to build the plugin
- cd vlc/build/macos-install
- sed -i '' "1s|.*|prefix=$(pwd | sed 's#/#\\\/#g')|" lib/pkgconfig/libvlc.pc
- export PATH="$HOME/sandbox/bin:$PATH"
- cd ../../..
- PKG_CONFIG_PATH=./vlc/build/macos-install/lib/pkgconfig meson setup build_${ARCH} ${ARGS_TRIAL} --buildtype release
- ninja -C build_${ARCH}
- mv "build_${ARCH}/PluginSource/libVLCUnityPlugin.1.dylib" "build_${ARCH}/PluginSource/libVLCUnityPlugin.dylib"
- install_name_tool -add_rpath @loader_path/ build_${ARCH}/PluginSource/libVLCUnityPlugin.dylib
artifacts:
paths:
- "build_${ARCH}/PluginSource/libVLCUnityPlugin.dylib"
expire_in: 2 weeks
unity-plugin-macos-x86_64:
extends: .unity-plugin-macos-common
dependencies:
- libvlc-macos-x86_64
variables: *variables-macos-x64
tags:
- monterey
- amd64
unity-plugin-macos-x86_64-trial:
extends: .unity-plugin-macos-common
dependencies:
- libvlc-macos-x86_64
variables:
<<: [*variables-macos-x64, *variables-trial]
tags:
- monterey
- amd64
unity-plugin-macos-aarch64:
extends: .unity-plugin-macos-common
dependencies:
- libvlc-macos-aarch64
variables: *variables-macos-aarch64
tags:
- monterey
- macos-m1
unity-plugin-macos-aarch64-trial:
extends: .unity-plugin-macos-common
dependencies:
- libvlc-macos-aarch64
variables:
<<: [*variables-macos-aarch64, *variables-trial]
tags:
- monterey
- macos-m1
# libvlc iOS
.variables-ios-x64: &variables-ios-x64
ARCH: x86_64
SDKNAME: iphonesimulator
VLC_PATH: /Users/videolanci/sandbox/bin
SHORT_ARCH: x86_64
.variables-ios-arm64: &variables-ios-arm64
ARCH: aarch64
SDKNAME: iphoneos
VLC_PATH: /Users/videolanci/sandbox/bin
SHORT_ARCH: arm64
.libvlc-ios-common:
stage: build-libvlc
tags:
- monterey
script:
- git clone https://code.videolan.org/videolan/vlc && cd vlc
# get latest live555 patches
- curl -O https://code.videolan.org/videolan/VLCKit/-/raw/master/libvlc/patches/0001-Revert-contrib-live555-update-to-2022.07.14.patch
- curl -O https://code.videolan.org/videolan/VLCKit/-/raw/master/libvlc/patches/0002-contrib-use-live555-version-that-is-compatible-with-.patch
- git apply 0001-Revert-contrib-live555-update-to-2022.07.14.patch && git apply 0002-contrib-use-live555-version-that-is-compatible-with-.patch
- mkdir build && cd build
- ../extras/package/apple/build.sh --sdk=$SDKNAME --arch=$ARCH -j8 --enable-shared
- cd ../..
artifacts:
paths:
- vlc/build/vlc-$SDKNAME-$SHORT_ARCH/lib/*
- vlc/build/vlc-$SDKNAME-$SHORT_ARCH/include/*
expire_in: 2 weeks
libvlc-ios-x86_64:
extends: .libvlc-ios-common
variables: *variables-ios-x64
libvlc-ios-arm64:
extends: .libvlc-ios-common
variables: *variables-ios-arm64
# unity plugin iOS
.unity-plugin-ios-common:
stage: build-unity-plugin
tags:
- monterey
script:
# patch libvlc.pc to build the plugin
- cd vlc/build/vlc-$SDKNAME-$SHORT_ARCH
- sed -i '' "1s|.*|prefix=$(pwd | sed 's#/#\\\/#g')|" lib/pkgconfig/libvlc.pc
- cd ../../..
- export PATH="$HOME/sandbox/bin:$PATH"
- PKG_CONFIG_PATH=./vlc/build/vlc-$SDKNAME-$SHORT_ARCH/lib/pkgconfig meson setup --cross-file=cross/$SDKNAME.txt build_${SHORT_ARCH} ${ARGS_TRIAL} --buildtype release
- ninja -C build_${SHORT_ARCH}
- ./copy_ios.sh vlc/build/vlc-$SDKNAME-$SHORT_ARCH $SHORT_ARCH
artifacts:
paths:
- Assets/VLCUnity/Plugins/iOS
expire_in: 2 weeks
unity-plugin-ios-aarch64:
extends: .unity-plugin-ios-common
variables: *variables-ios-arm64
dependencies:
- libvlc-ios-arm64
unity-plugin-ios-aarch64-trial:
extends: .unity-plugin-ios-common
variables:
<<: [*variables-ios-arm64, *variables-trial]
dependencies:
- libvlc-ios-arm64
unity-plugin-ios-x86_64:
extends: .unity-plugin-ios-common
variables: *variables-ios-x64
dependencies:
- libvlc-ios-x86_64
# LibVLCSharp
.libvlcsharp-unity:
image:
name: $VLC_DEBIAN_IMAGE
tags:
- docker
- amd64
stage: build-libvlc
script:
- wget https://download.visualstudio.microsoft.com/download/pr/db901b0a-3144-4d07-b8ab-6e7a43e7a791/4d9d1b39b879ad969c6c0ceb6d052381/dotnet-sdk-8.0.401-linux-x64.tar.gz
- mkdir -p $HOME/dotnet && tar zxf dotnet-sdk-8.0.401-linux-x64.tar.gz -C $HOME/dotnet
- export DOTNET_ROOT=$HOME/dotnet
- export PATH=$PATH:$HOME/dotnet
- mkdir tmp && cd tmp && git clone https://code.videolan.org/videolan/LibVLCSharp lvs
- cd lvs
- git checkout -f master
- dotnet build src/LibVLCSharp/LibVLCSharp.csproj ${ARGS} -c Release
after_script:
- mkdir nightlies
- cp -r tmp/lvs/src/LibVLCSharp/bin/Release/netstandard2.0 nightlies
artifacts:
paths:
- nightlies/*
expire_in: 2 weeks
libvlcsharp-all:
extends: .libvlcsharp-unity
variables:
ARGS: /p:UNITY=true
libvlcsharp-ios:
extends: .libvlcsharp-unity
variables:
ARGS: /p:UNITY_IOS=true