Bug 1627646 - Avoid creating a Port object when there are no listeners r=mixedpuppy
[gecko.git] / third_party / dav1d / .gitlab-ci.yml
blob641dfdf7dd8088a607feae9b4f0c15abc1a24fa8
1 stages:
2     - style
3     - build
4     - test
6 style-check:
7     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
8     stage: style
9     tags:
10         - debian
11         - amd64
12     script:
13         - git grep -I -n -P "\t|\r| $" -- . ':(exclude)*/compat/*' && exit 1
14         - git grep -I -n -i "david" -- . ':(exclude)THANKS.md' ':(exclude).gitlab-ci.yml' && exit 1
15         - git grep -I -l -z "" -- . ':(exclude)*/compat/*' | while IFS= read -r -d '' i; do
16               if [ -n "$(tail -c 1 "$i")" ]; then
17                   echo "No newline at end of $i";
18                   exit 1;
19               fi;
20           done
21         - git remote rm upstream 2> /dev/null || true
22         - git remote add upstream https://code.videolan.org/videolan/dav1d.git
23         - git fetch -q upstream master
24         - for i in $(git rev-list HEAD ^upstream/master); do
25               echo "Checking commit message of $i";
26               msg="$(git log --format=%B -n 1 $i)";
27               if [ -n "$(echo "$msg" | awk "NR==2")" ]; then
28                   echo "Malformed commit message in $i, second line must be empty";
29                   exit 1;
30               fi;
31               if echo "$msg" | head -1 | grep -q '\.$'; then
32                   echo "Malformed commit message in $i, trailing period in subject line";
33                   exit 1;
34               fi;
35           done
37 build-debian:
38     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
39     stage: build
40     tags:
41         - avx2
42         - amd64
43     script:
44         - meson build --buildtype release --werror
45         - ninja -C build
46         - cd build && meson test -v
48 build-debian-static:
49     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
50     stage: build
51     tags:
52         - debian
53         - amd64
54     script:
55         - meson build --buildtype release --default-library static --werror
56         - ninja -C build
57         - cd build && meson test -v
58         - nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -v " _*dav1d_")
60 build-debian32:
61     image: registry.videolan.org:5000/dav1d-debian-unstable:20181218135732
62     stage: build
63     tags:
64         - debian
65         - amd64
66     script:
67         - meson build --buildtype release
68                       --werror
69                       --cross-file /opt/crossfiles/linux32.meson
70         - ninja -C build
71         - cd build && meson test -v
73 build-win32:
74     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
75     stage: build
76     tags:
77         - debian
78         - amd64
79     script:
80         - wineserver -p && wine wineboot
81         - meson build --buildtype release
82                       --werror
83                       --libdir lib
84                       --prefix "$(pwd)/build/dav1d_install"
85                       --cross-file /opt/crossfiles/i686-w64-mingw32.meson
86                       -Ddefault_library=both
87         - ninja -C build
88         - ninja -C build install
89         - cd build && meson test -v
90         - i686-w64-mingw32-nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
91     artifacts:
92         name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
93         paths:
94             - build/dav1d_install/
95         expire_in: 1 week
97 build-win32-unaligned-stack:
98     image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
99     stage: build
100     tags:
101         - debian
102         - amd64
103     script:
104         - wineserver -p && wine wineboot
105         - meson build --buildtype release
106                       --werror
107                       --cross-file /opt/crossfiles/i686-w64-mingw32.meson
108                       -Dstack_alignment=4
109         - ninja -C build
110         - cd build && meson test -v
112 build-win64:
113     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
114     stage: build
115     tags:
116         - debian
117         - amd64
118     script:
119         - wineserver -p && wine wineboot
120         - meson build --buildtype release
121                       --werror
122                       --libdir lib
123                       --prefix "$(pwd)/build/dav1d_install"
124                       --cross-file /opt/crossfiles/x86_64-w64-mingw32.meson
125                       -Ddefault_library=both
126         - ninja -C build
127         - ninja -C build install
128         - cd build && meson test -v
129         - x86_64-w64-mingw32-nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
130     artifacts:
131         name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
132         paths:
133             - build/dav1d_install/
134         expire_in: 1 week
136 build-win-arm32:
137     image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
138     stage: build
139     tags:
140         - debian
141         - amd64
142     script:
143         - meson build --buildtype release
144                       --werror
145                       --libdir lib
146                       --prefix "$(pwd)/build/dav1d_install"
147                       --cross-file /opt/crossfiles/armv7-w64-mingw32.meson
148                       -Ddefault_library=both
149         - ninja -C build
150         - armv7-w64-mingw32-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
152 build-win-arm64:
153     image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
154     stage: build
155     tags:
156         - debian
157         - amd64
158     script:
159         - meson build --buildtype release
160                       --werror
161                       --libdir lib
162                       --prefix "$(pwd)/build/dav1d_install"
163                       --cross-file /opt/crossfiles/aarch64-w64-mingw32.meson
164                       -Ddefault_library=both
165         - ninja -C build
166         - ninja -C build install
167         - aarch64-w64-mingw32-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
168     artifacts:
169         name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
170         paths:
171             - build/dav1d_install/
172         expire_in: 1 week
174 build-debian-aarch64:
175     stage: build
176     image: registry.videolan.org/dav1d-debian-buster-aarch64:20200218203017
177     tags:
178         - aarch64
179         - debian
180     script:
181         - meson build --buildtype debugoptimized --werror
182         - ninja -C build
183         - cd build && meson test -v
185 build-debian-aarch64-clang-5:
186     stage: build
187     image: registry.videolan.org/dav1d-debian-buster-aarch64:20200218203017
188     tags:
189         - aarch64
190         - debian
191     script:
192         - env CC=clang-5.0 CFLAGS='-integrated-as' meson build --buildtype release
193         - ninja -C build
194         - cd build && meson test -v
196 build-macos:
197     stage: build
198     tags:
199         - macos
200     script:
201         - meson build --buildtype release -Ddefault_library=both --werror
202         - ninja -C build
203         - cd build && meson test -v
205 build-debian-werror:
206     image: registry.videolan.org/dav1d-debian-buster-aarch64:20200218203017
207     stage: build
208     tags:
209         - aarch64
210         - debian
211     script:
212         - env CC='clang-7' meson build --buildtype debug --werror
213         - ninja -C build
215 build-debian-armv7:
216     stage: build
217     image: registry.videolan.org:5000/dav1d-debian-unstable-armv7:20190202101732
218     tags:
219         - armv7
220         - debian
221     script:
222         - linux32 meson build --buildtype debugoptimized --werror
223         - ninja -C build
224         - cd build && meson test -v
226 build-debian-armv7-clang-5:
227     stage: build
228     image: registry.videolan.org:5000/dav1d-debian-unstable-armv7:20190202101732
229     tags:
230         - armv7
231         - debian
232     script:
233         - env CC=clang-5.0 CFLAGS='-integrated-as' linux32 meson build --buildtype release
234         - ninja -C build
235         - cd build && meson test -v
237 build-ubuntu-snap:
238     stage: build
239     image: registry.videolan.org/dav1d-ubuntu-bionic:20200121182340
240     tags:
241         - debian
242         - amd64
243     script:
244         - cd package/snap && snapcraft snap
245         - |
246            if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then
247             echo $SNAP_LOGIN | base64 --decode | snapcraft login --with -
248             snapcraft push dav1d_*.snap --release edge
249             snapcraft logout
250            fi
251     artifacts:
252         name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
253         paths:
254             - package/snap/dav1d_*.snap
255         expire_in: 1 week
256     allow_failure: true
258 build-debian-ppc64le:
259     stage: build
260     image: registry.videolan.org/dav1d-debian-unstable-ppc64le:20190606105121
261     tags:
262         - ppc64le
263         - docker
264     script:
265         - meson build --buildtype release --werror
266         - ninja -C build
267         - cd build && meson test -v
269 test-debian:
270     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
271     stage: test
272     needs: ["build-debian"]
273     tags:
274         - debian
275         - amd64
276     cache:
277         key: testdata.git-20190215
278         paths:
279             - cache/dav1d-test-data.git/
280     script:
281         - test -d cache || mkdir cache
282         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
283         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
284         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
285         - meson build --buildtype release -Dtestdata_tests=true -Dlogging=false
286         - ninja -C build
287         - cd build && time meson test -v
288     dependencies: []
290 test-debian-unaligned-stack:
291     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
292     stage: test
293     needs: ["build-debian"]
294     tags:
295         - avx2
296         - amd64
297     cache:
298         key: testdata.git-20190215
299         paths:
300             - cache/dav1d-test-data.git/
301     script:
302         - test -d cache || mkdir cache
303         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
304         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
305         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
306         - meson build --buildtype release -Dtestdata_tests=true -Dlogging=false -Dstack_alignment=16
307         - ninja -C build
308         - cd build && time meson test -v
309     dependencies: []
311 test-debian-asan:
312     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
313     stage: test
314     needs: ["build-debian"]
315     tags:
316         - debian
317         - amd64
318     cache:
319         key: testdata.git-20190215
320         paths:
321             - cache/dav1d-test-data.git/
322     variables:
323         ASAN_OPTIONS: 'detect_leaks=0'
324     script:
325         - test -d cache || mkdir cache
326         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
327         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
328         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
329         - meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=address -Denable_asm=false
330         - ninja -C build
331         - cd build && time meson test -v --setup=sanitizer
332     dependencies: []
334 test-debian-msan:
335     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
336     stage: test
337     needs: ["build-debian"]
338     tags:
339         - debian
340         - amd64
341     cache:
342         key: testdata.git-20190215
343         paths:
344             - cache/dav1d-test-data.git/
345     variables:
346         MSAN_OPTIONS: 'exitcode=1'
347     script:
348         - test -d cache || mkdir cache
349         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
350         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
351         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
352         - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=memory -Db_lundef=false -Denable_asm=false
353         - ninja -C build
354         - cd build && time meson test -v --setup=sanitizer
355     dependencies: []
357 test-debian-ubsan:
358     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
359     stage: test
360     needs: ["build-debian"]
361     tags:
362         - debian
363         - amd64
364     cache:
365         key: testdata.git-20190215
366         paths:
367             - cache/dav1d-test-data.git/
368     variables:
369         UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
370     script:
371         - test -d cache || mkdir cache
372         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
373         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
374         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
375         - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=undefined -Db_lundef=false -Denable_asm=false
376         - ninja -C build
377         - cd build && time meson test -v --setup=sanitizer
378     dependencies: []
380 test-win64:
381     image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
382     stage: test
383     needs: ["build-win64"]
384     tags:
385         - avx2
386         - amd64
387     cache:
388         key: testdata.git-20190215
389         paths:
390             - cache/dav1d-test-data.git/
391     script:
392         - test -d cache || mkdir cache
393         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
394         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
395         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
396         - wineserver -p && wine wineboot
397         - meson build --buildtype release
398                       -Dtestdata_tests=true
399                       -Dlogging=false
400                       --cross-file /opt/crossfiles/x86_64-w64-mingw32.meson
401         - ninja -C build
402         - cd build && time meson test -v
403     dependencies: []
405 test-debian-aarch64:
406     image: registry.videolan.org/dav1d-debian-buster-aarch64:20200218203017
407     stage: test
408     needs: ["build-debian-aarch64"]
409     tags:
410         - aarch64
411         - debian
412     cache:
413         key: testdata.git-20190215
414         paths:
415             - cache/dav1d-test-data.git/
416     script:
417         - test -d cache || mkdir cache
418         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
419         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
420         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
421         - meson build --buildtype release
422                       -Dtestdata_tests=true
423                       -Dlogging=false
424         - ninja -C build
425         - cd build && time meson test -v
426     dependencies: []
428 test-debian-ppc64le:
429     image: registry.videolan.org/dav1d-debian-unstable-ppc64le:20190606105121
430     stage: test
431     needs: ["build-debian-ppc64le"]
432     tags:
433         - ppc64le
434         - docker
435     cache:
436         key: testdata.git-20190215
437         paths:
438             - cache/dav1d-test-data.git/
439     script:
440         - test -d cache || mkdir cache
441         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
442         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
443         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
444         - meson build --buildtype release
445                       -Dtestdata_tests=true
446                       -Dlogging=false
447         - ninja -C build
448         - cd build && time meson test -v
449     dependencies: []
451 test-debian-armv7-clang-5:
452     stage: test
453     image: registry.videolan.org:5000/dav1d-debian-unstable-armv7:20190202101732
454     needs: ["build-debian-armv7-clang-5"]
455     tags:
456         - armv7
457         - debian
458     cache:
459         key: testdata.git-20190215
460         paths:
461             - cache/dav1d-test-data.git/
462     script:
463         - test -d cache || mkdir cache
464         - test -d cache/dav1d-test-data.git && GIT_DIR=cache/dav1d-test-data.git git fetch --refmap=refs/heads/master:refs/heads/master origin master
465         - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
466         - git clone cache/dav1d-test-data.git tests/dav1d-test-data
467         - env CC=clang-5.0 CFLAGS='-integrated-as' linux32 meson build --buildtype release
468                                                                -Dtestdata_tests=true
469                                                                -Dlogging=false
470         - ninja -C build
471         - cd build && time meson test -v
472     dependencies: []