forked from fraunhoferhhi/vvdec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci-internal.yml
379 lines (330 loc) · 9.48 KB
/
.gitlab-ci-internal.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
stages:
- build
variables:
FULL_BUILD:
value: "0"
description: "Enable full build with various cpompilers."
REBUILD_DOCKER_IMAGE:
value: "0"
description: "rebuild and publish docker image with latest emscripten"
EMSDK_VERSION:
value: "3.1.26"
description: "EMSDK version used for WASM build (either version number or latest)"
CCACHE_DIR: "${CI_PROJECT_DIR}/ext/ccache"
CCACHE_MAXSIZE: 500M
.base_template:
stage: build
interruptible: true
after_script: [ccache -s]
cache:
- paths:
- ext/bitstreams
key:
files:
- cmake/modules/define_bitstream_files.cmake
when: always
- paths:
- ext/ccache
key: $CI_JOB_NAME
when: always
tags:
- docker
.build_only_template:
extends: .base_template
script:
- make disable-lto=1 all
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master"'
.build_only_template_full:
extends: .build_only_template
rules:
- if: '$FULL_BUILD == "1"'
- if: '$CI_COMMIT_BRANCH == "master"'
.build_test_template:
extends: .base_template
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CTEST_PARALLEL_LEVEL: 2
script:
- make enable-bitstream-download=1 enable-local-bitstream-download=1 disable-lto=1 all
- make test
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_BRANCH == "develop"'
when: delayed
start_in: 1 hour
.build_test_macos_template:
extends: .build_test_template
script:
- make osx-arch=${OSX_ARCH} enable-bitstream-download=1 enable-local-bitstream-download=1 disable-lto=1 all
- make osx-arch=${OSX_ARCH} test
.build_test_msvc_template:
extends: .build_test_template
script:
- make msvc-arch=${MSVC_ARCH} enable-bitstream-download=1 enable-local-bitstream-download=1 disable-lto=1 all
- make msvc-arch=${MSVC_ARCH} test
build_gcc5_ubuntu1804:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_1804_full:latest
variables:
CC: gcc-5
CXX: g++-5
build_gcc6_ubuntu1804:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_1804_full:latest
variables:
CC: gcc-6
CXX: g++-6
build_gcc7_ubuntu2004:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_full:latest
variables:
CC: gcc-7
CXX: g++-7
build_gcc8_ubuntu2004:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_full:latest
variables:
CC: gcc-8
CXX: g++-8
build_gcc9_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: gcc-9
CXX: g++-9
build_gcc10_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: gcc-10
CXX: g++-10
build_gcc11_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: gcc-11
CXX: g++-11
build_gcc12_ubuntu2204:
extends: .build_only_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: gcc-12
CXX: g++-12
build_gcc13_ubuntu2404:
extends: .build_only_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
CC: gcc-13
CXX: g++-13
build_gcc14_ubuntu2404:
extends: .build_only_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
CC: gcc-14
CXX: g++-14
build_clang7_ubuntu2004:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_full:latest
variables:
CC: clang-7
CXX: clang++-7
build_clang8_ubuntu2004:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_full:latest
variables:
CC: clang-8
CXX: clang++-8
build_clang9_ubuntu2004:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_full:latest
variables:
CC: clang-9
CXX: clang++-9
build_clang10_ubuntu2004:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_full:latest
variables:
CC: clang-10
CXX: clang++-10
build_clang11_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: clang-11
CXX: clang++-11
build_clang12_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: clang-12
CXX: clang++-12
build_clang13_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: clang-13
CXX: clang++-13
build_clang14_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: clang-14
CXX: clang++-14
build_clang15_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
CC: clang-15
CXX: clang++-15
build_clang16_ubuntu2404:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
CC: clang-16
CXX: clang++-16
build_clang17_ubuntu2404:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
CC: clang-17
CXX: clang++-17
build_clang18_ubuntu2404:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2404_full:latest
variables:
CC: clang-18
CXX: clang++-18
build_mingw_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
toolchainfile: cmake/toolchains/x86_64-w64-mingw32-gcc-posix-ubuntu.cmake
build_aarch64_gcc_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
toolchainfile: cmake/toolchains/aarch64-linux-gnu-gcc-ubuntu.cmake
build_armv7_gcc_ubuntu2204:
extends: .build_only_template_full
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_full:latest
variables:
toolchainfile: cmake/toolchains/arm-linux-gnueabihf-gcc-ubuntu.cmake
build_ios:
extends: .build_only_template_full
variables:
CONFIG_OPTIONS: -DCMAKE_SYSTEM_NAME=iOS
# build only libvvdec:
BUILD_TOOL_OPTIONS: "-t vvdec"
script:
# static build only:
- make disable-lto=1 static
tags:
- macos-arm
test_ubuntu1804:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_1804_dev:latest
test_ubuntu2004:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2004_dev:latest
test_ubuntu2204:
extends: .build_test_template
image: $CI_REGISTRY/pub/dockerimages/ubuntu_2204_dev:latest
test_vc191x:
extends: .build_test_msvc_template
variables:
MSVC_ARCH: x64
tags:
- vc191x
test_vc192x:
extends: .build_test_msvc_template
variables:
MSVC_ARCH: x64
tags:
- vc192x
test_vc193x:
extends: .build_test_msvc_template
variables:
MSVC_ARCH: x64
tags:
- vc193x
test_vc193x_Win32:
extends: .build_test_msvc_template
variables:
MSVC_ARCH: Win32
tags:
- vc193x
build_vc193x_arm64:
extends: .build_only_template_full
variables:
MSVC_ARCH: arm64
tags:
- vc193x
script:
- make msvc-arch=${MSVC_ARCH} all
test_macos_arm64:
extends: .build_test_macos_template
variables:
OSX_ARCH: arm64
tags:
- macos-arm
test_macos_x86_64:
extends: .build_test_macos_template
variables:
OSX_ARCH: x86_64
tags:
- macos-x86_64
.rebuild_docker_image_template:
extends: .build_only_template
script:
- echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- mkdir -p empty_context
- if [[ $REBUILD_DOCKER_IMAGE = 1 ]] ; then NO_CACHE_ARG=--no-cache=true ; fi
- docker pull $DOCKER_IMAGE_TAG || true
- docker build -t $DOCKER_IMAGE_TAG
-f $DOCKERFILE
--build-arg BUILDKIT_INLINE_CACHE=1
--pull
--cache-from $DOCKER_IMAGE_TAG
$NO_CACHE_ARG
$IMAGE_BUILD_ARGS
empty_context
- docker push $DOCKER_IMAGE_TAG
variables:
DOCKERFILE: ""
DOCKER_IMAGE_TAG: ""
IMAGE_BUILD_ARGS: ""
tags:
- docker-build
rebuild_selenium_docker_image:
extends: .rebuild_docker_image_template
variables:
DOCKERFILE: ".selenium.dockerfile"
DOCKER_IMAGE_TAG: "$CI_REGISTRY_IMAGE/selenium-debian:emsdk-$EMSDK_VERSION"
IMAGE_BUILD_ARGS: "--build-arg EMSDK_VER=$EMSDK_VERSION"
rules:
- if: '$CI_PROJECT_PATH == "git/vvdec"'
test_wasm:
extends: .build_test_template
image: $CI_REGISTRY/git/vvdec/selenium-debian:emsdk-$EMSDK_VERSION
needs:
- job: rebuild_selenium_docker_image
optional: true
script:
- source /opt/emsdk/emsdk_env.sh
- emcc --version
- emcmake cmake -GNinja -B build/wasm -DVVDEC_ENABLE_X86_SIMD=TRUE -DVVDEC_ENABLE_BITSTREAM_DOWNLOAD=ON -DVVDEC_ENABLE_LOCAL_BITSTREAM_DOWNLOAD=ON
- cmake --build build/wasm
- cmake --build build/wasm -t install
- python3 tests/wasm/wasm_test-server.py &
- python3 tests/wasm/run_tests.py
artifacts:
name: "vvdec-wasm"
paths:
- install/