.gitlab-ci.yml 13.5 KB
Newer Older
1
stages:
2
    - style
3
    - build
4
    - test
5

6
style-check:
7
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
8 9 10 11 12
    stage: style
    tags:
        - debian
        - amd64
    script:
13 14 15
        - git grep -I -n -P "\t|\r| $" -- . ':(exclude)*/compat/*' && exit 1
        - git grep -I -n -i "david" -- . ':(exclude)THANKS.md' ':(exclude).gitlab-ci.yml' && exit 1
        - git grep -I -l -z "" -- . ':(exclude)*/compat/*' | while IFS= read -r -d '' i; do
16 17 18 19 20
              if [ -n "$(tail -c 1 "$i")" ]; then
                  echo "No newline at end of $i";
                  exit 1;
              fi;
          done
21
        - git remote rm upstream 2> /dev/null || true
22 23
        - git remote add upstream https://code.videolan.org/videolan/dav1d.git
        - git fetch -q upstream master
24 25 26 27 28 29 30 31 32 33 34 35
        - for i in $(git rev-list HEAD ^upstream/master); do
              echo "Checking commit message of $i";
              msg="$(git log --format=%B -n 1 $i)";
              if [ -n "$(echo "$msg" | awk "NR==2")" ]; then
                  echo "Malformed commit message in $i, second line must be empty";
                  exit 1;
              fi;
              if echo "$msg" | head -1 | grep -q '\.$'; then
                  echo "Malformed commit message in $i, trailing period in subject line";
                  exit 1;
              fi;
          done
36

37
build-debian:
38
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
39 40 41 42 43
    stage: build
    tags:
        - debian
        - amd64
    script:
44
        - meson build --buildtype release --werror
45
        - ninja -C build
Marvin Scholz's avatar
Marvin Scholz committed
46
        - cd build && meson test -v
47

48
build-debian-static:
49
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
50 51 52 53 54
    stage: build
    tags:
        - debian
        - amd64
    script:
55
        - meson build --buildtype release --default-library static --werror
56 57
        - ninja -C build
        - cd build && meson test -v
58
        - nm -A -g src/libdav1d.a | grep " [ABCDGRST] " | (! grep -v " _*dav1d_")
59

60
build-debian32:
61
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181218135732
62 63 64 65 66 67 68 69 70 71 72
    stage: build
    tags:
        - debian
        - amd64
    script:
        - meson build --buildtype release
                      --werror
                      --cross-file /opt/crossfiles/linux32.meson
        - ninja -C build
        - cd build && meson test -v

73
build-win32:
74
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
75 76
    stage: build
    tags:
77 78
        - debian
        - amd64
79
    script:
80
        - wineserver -p && wine wineboot
81 82 83 84 85 86
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/i686-w64-mingw32.meson
                      -Ddefault_library=both
87 88
        - ninja -C build
        - 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 92 93 94 95
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - build/dav1d_install/
        expire_in: 1 week
96

97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
build-win32-unaligned-stack:
    image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
    stage: build
    tags:
        - debian
        - amd64
    script:
        - wineserver -p && wine wineboot
        - meson build --buildtype release
                      --werror
                      --cross-file /opt/crossfiles/i686-w64-mingw32.meson
                      -Dstack_alignment=4
        - ninja -C build
        - cd build && meson test -v

112
build-win64:
113
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
114 115
    stage: build
    tags:
116 117
        - debian
        - amd64
118
    script:
119
        - wineserver -p && wine wineboot
120 121 122 123 124 125
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/x86_64-w64-mingw32.meson
                      -Ddefault_library=both
126 127
        - ninja -C build
        - 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 131 132 133 134
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - build/dav1d_install/
        expire_in: 1 week
135

136
build-win-arm32:
137
    image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
138 139
    stage: build
    tags:
140 141
        - debian
        - amd64
142 143 144 145 146 147 148 149
    script:
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/armv7-w64-mingw32.meson
                      -Ddefault_library=both
        - ninja -C build
150
        - armv7-w64-mingw32-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
151 152

build-win-arm64:
153
    image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
154 155
    stage: build
    tags:
156 157
        - debian
        - amd64
158 159 160 161 162 163 164 165 166
    script:
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/aarch64-w64-mingw32.meson
                      -Ddefault_library=both
        - ninja -C build
        - ninja -C build install
167
        - aarch64-w64-mingw32-nm -A -g build/src/libdav1d.a | grep " [ABCDGRST] " | (! grep -E -v " \.| _*dav1d_")
168 169 170 171 172 173
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - build/dav1d_install/
        expire_in: 1 week

174 175
build-debian-aarch64:
    stage: build
176
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
177 178 179 180
    tags:
        - aarch64
        - debian
    script:
181
        - meson build --buildtype release --werror
182 183 184 185 186
        - ninja -C build
        - cd build && meson test -v

build-debian-aarch64-clang-5:
    stage: build
187
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
188 189 190 191 192 193 194
    tags:
        - aarch64
        - debian
    script:
        - env CC=clang-5.0 CFLAGS='-integrated-as' meson build --buildtype release
        - ninja -C build
        - cd build && meson test -v
195 196 197 198 199 200

build-macos:
    stage: build
    tags:
        - macos
    script:
201
        - meson build --buildtype release -Ddefault_library=both --werror
202 203
        - ninja -C build
        - cd build && meson test -v
204 205

build-debian-werror:
206
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
207 208
    stage: build
    tags:
209
        - aarch64
210 211
        - debian
    script:
212
        - env CC='clang-7' meson build --buildtype debug --werror
213
        - ninja -C build
214

215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236
build-debian-armv7:
    stage: build
    image: registry.videolan.org:5000/dav1d-debian-unstable-armv7:20190202101732
    tags:
        - armv7
        - debian
    script:
        - meson build --buildtype release --werror
        - ninja -C build
        - cd build && meson test -v

build-debian-armv7-clang-5:
    stage: build
    image: registry.videolan.org:5000/dav1d-debian-unstable-armv7:20190202101732
    tags:
        - armv7
        - debian
    script:
        - env CC=clang-5.0 CFLAGS='-integrated-as' meson build --buildtype release
        - ninja -C build
        - cd build && meson test -v

237 238 239 240 241
build-ubuntu-snap:
    stage: build
    image: registry.videolan.org:5000/dav1d-ubuntu-bionic:20190221154127
    tags:
        - debian
242
        - amd64
243 244
    script:
        - snapcraft snap
245 246 247 248 249 250
        - |
           if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then
            echo $SNAP_LOGIN | base64 --decode | snapcraft login --with -
            snapcraft push dav1d_*.snap --release edge
            snapcraft logout
           fi
251 252 253 254 255
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - dav1d_*.snap
        expire_in: 1 week
256
    allow_failure: true
257

258
test-debian:
259
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
260 261 262 263
    stage: test
    tags:
        - debian
        - amd64
Janne Grunau's avatar
Janne Grunau committed
264
    cache:
265
        key: testdata.git-20190215
Janne Grunau's avatar
Janne Grunau committed
266 267
        paths:
            - cache/dav1d-test-data.git/
268
    script:
Janne Grunau's avatar
Janne Grunau committed
269
        - test -d cache || mkdir cache
270
        - 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
Janne Grunau's avatar
Janne Grunau committed
271 272
        - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
        - git clone cache/dav1d-test-data.git tests/dav1d-test-data
273
        - meson build --buildtype release -Dtestdata_tests=true -Dlogging=false
274 275
        - ninja -C build
        - cd build && time meson test -v
276
    dependencies: []
277

278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297
test-debian-unaligned-stack:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
    stage: test
    tags:
        - debian
        - amd64
    cache:
        key: testdata.git-20190215
        paths:
            - cache/dav1d-test-data.git/
    script:
        - test -d cache || mkdir cache
        - 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
        - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
        - git clone cache/dav1d-test-data.git tests/dav1d-test-data
        - meson build --buildtype release -Dtestdata_tests=true -Dlogging=false -Dstack_alignment=16
        - ninja -C build
        - cd build && time meson test -v
    dependencies: []

298
test-debian-asan:
299
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
300 301 302 303 304
    stage: test
    tags:
        - debian
        - amd64
    cache:
305
        key: testdata.git-20190215
306 307 308 309 310 311 312 313 314
        paths:
            - cache/dav1d-test-data.git/
    variables:
        ASAN_OPTIONS: 'detect_leaks=0'
    script:
        - test -d cache || mkdir cache
        - 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
        - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
        - git clone cache/dav1d-test-data.git tests/dav1d-test-data
315
        - meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=address -Dbuild_asm=false
316
        - ninja -C build
317
        - cd build && time meson test -v --setup=sanitizer
318
    dependencies: []
319 320

test-debian-msan:
321
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
322 323 324
    stage: test
    tags:
        - debian
325
        - amd64
326
    cache:
327
        key: testdata.git-20190215
328 329
        paths:
            - cache/dav1d-test-data.git/
330 331
    variables:
        MSAN_OPTIONS: 'exitcode=1'
332 333 334 335 336
    script:
        - test -d cache || mkdir cache
        - 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
        - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
        - git clone cache/dav1d-test-data.git tests/dav1d-test-data
337
        - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=memory -Db_lundef=false -Dbuild_asm=false
338
        - ninja -C build
339
        - cd build && time meson test -v --setup=sanitizer
340
    dependencies: []
341 342

test-debian-ubsan:
343
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
344 345 346 347 348
    stage: test
    tags:
        - debian
        - amd64
    cache:
349
        key: testdata.git-20190215
350 351
        paths:
            - cache/dav1d-test-data.git/
352 353
    variables:
        UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
354 355 356 357 358
    script:
        - test -d cache || mkdir cache
        - 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
        - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
        - git clone cache/dav1d-test-data.git tests/dav1d-test-data
359
        - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=undefined -Db_lundef=false -Dbuild_asm=false
360
        - ninja -C build
361
        - cd build && time meson test -v --setup=sanitizer
362
    dependencies: []
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386

test-win64:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
    stage: test
    tags:
        - debian
        - amd64
    cache:
        key: testdata.git-20190215
        paths:
            - cache/dav1d-test-data.git/
    script:
        - test -d cache || mkdir cache
        - 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
        - test -d cache/dav1d-test-data.git || git clone --bare https://code.videolan.org/videolan/dav1d-test-data.git cache/dav1d-test-data.git
        - git clone cache/dav1d-test-data.git tests/dav1d-test-data
        - wineserver -p && wine wineboot
        - meson build --buildtype release
                      -Dtestdata_tests=true
                      -Dlogging=false
                      --cross-file /opt/crossfiles/x86_64-w64-mingw32.meson
        - ninja -C build
        - cd build && time meson test -v
    dependencies: []