.gitlab-ci.yml 11.9 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
        - git grep -n -P "\t|\r| $" -- . ':(exclude)*/compat/*' && exit 1
14
        - git grep -n -i "david" -- . ':(exclude)THANKS.md' ':(exclude).gitlab-ci.yml' && exit 1
15
        - git remote rm upstream 2> /dev/null || true
16 17
        - git remote add upstream https://code.videolan.org/videolan/dav1d.git
        - git fetch -q upstream master
18 19 20 21 22 23 24 25 26 27 28 29
        - 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
30

31
build-debian:
32
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
33 34 35 36 37
    stage: build
    tags:
        - debian
        - amd64
    script:
38
        - meson build --buildtype release --werror
39
        - ninja -C build
Marvin Scholz's avatar
Marvin Scholz committed
40
        - cd build && meson test -v
41

42
build-debian-static:
43
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
44 45 46 47 48
    stage: build
    tags:
        - debian
        - amd64
    script:
49
        - meson build --buildtype release --default-library static --werror
50 51 52
        - ninja -C build
        - cd build && meson test -v

53
build-debian32:
54
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181218135732
55 56 57 58 59 60 61 62 63 64 65
    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

66
build-win32:
67
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
68 69
    stage: build
    tags:
70 71
        - debian
        - amd64
72
    script:
73
        - wineserver -p && wine wineboot
74 75 76 77 78 79
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/i686-w64-mingw32.meson
                      -Ddefault_library=both
80 81
        - ninja -C build
        - ninja -C build install
82
        - cd build && meson test -v
83 84 85 86 87
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - build/dav1d_install/
        expire_in: 1 week
88

89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
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

104
build-win64:
105
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
106 107
    stage: build
    tags:
108 109
        - debian
        - amd64
110
    script:
111
        - wineserver -p && wine wineboot
112 113 114 115 116 117
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/x86_64-w64-mingw32.meson
                      -Ddefault_library=both
118 119
        - ninja -C build
        - ninja -C build install
120
        - cd build && meson test -v
121 122 123 124 125
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - build/dav1d_install/
        expire_in: 1 week
126

127
build-win-arm32:
128
    image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
129 130
    stage: build
    tags:
131 132
        - debian
        - amd64
133 134 135 136 137 138 139 140 141 142
    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

build-win-arm64:
143
    image: registry.videolan.org:5000/vlc-debian-llvm-mingw:20190218133533
144 145
    stage: build
    tags:
146 147
        - debian
        - amd64
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
    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
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - build/dav1d_install/
        expire_in: 1 week

163 164
build-debian-aarch64:
    stage: build
165
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
166 167 168 169
    tags:
        - aarch64
        - debian
    script:
170
        - meson build --buildtype release --werror
171 172 173 174 175
        - ninja -C build
        - cd build && meson test -v

build-debian-aarch64-clang-5:
    stage: build
176
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
177 178 179 180 181 182 183
    tags:
        - aarch64
        - debian
    script:
        - env CC=clang-5.0 CFLAGS='-integrated-as' meson build --buildtype release
        - ninja -C build
        - cd build && meson test -v
184 185 186 187 188 189

build-macos:
    stage: build
    tags:
        - macos
    script:
190
        - meson build --buildtype release -Ddefault_library=both --werror
191 192
        - ninja -C build
        - cd build && meson test -v
193 194

build-debian-werror:
195
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
196 197
    stage: build
    tags:
198
        - aarch64
199 200
        - debian
    script:
201
        - env CC='clang-7' meson build --buildtype debug --werror
202
        - ninja -C build
203

204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
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

226 227 228 229 230
build-ubuntu-snap:
    stage: build
    image: registry.videolan.org:5000/dav1d-ubuntu-bionic:20190221154127
    tags:
        - debian
231
        - amd64
232 233
    script:
        - snapcraft snap
234 235 236 237 238 239
        - |
           if [ "$CI_PROJECT_NAMESPACE" = "videolan" ]; then
            echo $SNAP_LOGIN | base64 --decode | snapcraft login --with -
            snapcraft push dav1d_*.snap --release edge
            snapcraft logout
           fi
240 241 242 243 244
    artifacts:
        name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
        paths:
            - dav1d_*.snap
        expire_in: 1 week
245
    allow_failure: true
246

247
test-debian:
248
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
249 250 251 252
    stage: test
    tags:
        - debian
        - amd64
Janne Grunau's avatar
Janne Grunau committed
253
    cache:
254
        key: testdata.git-20190215
Janne Grunau's avatar
Janne Grunau committed
255 256
        paths:
            - cache/dav1d-test-data.git/
257
    script:
Janne Grunau's avatar
Janne Grunau committed
258
        - test -d cache || mkdir cache
259
        - 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
260 261
        - 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
262
        - meson build --buildtype release -Dtestdata_tests=true -Dlogging=false
263 264
        - ninja -C build
        - cd build && time meson test -v
265
    dependencies: []
266 267

test-debian-asan:
268
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
269 270 271 272 273
    stage: test
    tags:
        - debian
        - amd64
    cache:
274
        key: testdata.git-20190215
275 276 277 278 279 280 281 282 283
        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
284
        - meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=address -Dbuild_asm=false
285
        - ninja -C build
286
        - cd build && time meson test -v --setup=sanitizer
287
    dependencies: []
288 289

test-debian-msan:
290
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
291 292 293
    stage: test
    tags:
        - debian
294
        - amd64
295
    cache:
296
        key: testdata.git-20190215
297 298
        paths:
            - cache/dav1d-test-data.git/
299 300
    variables:
        MSAN_OPTIONS: 'exitcode=1'
301 302 303 304 305
    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
306
        - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=memory -Db_lundef=false -Dbuild_asm=false
307
        - ninja -C build
308
        - cd build && time meson test -v --setup=sanitizer
309
    dependencies: []
310 311

test-debian-ubsan:
312
    image: registry.videolan.org:5000/dav1d-debian-unstable:20190215130514
313 314 315 316 317
    stage: test
    tags:
        - debian
        - amd64
    cache:
318
        key: testdata.git-20190215
319 320
        paths:
            - cache/dav1d-test-data.git/
321 322
    variables:
        UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
323 324 325 326 327
    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
328
        - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Dlogging=false -Db_sanitize=undefined -Db_lundef=false -Dbuild_asm=false
329
        - ninja -C build
330
        - cd build && time meson test -v --setup=sanitizer
331
    dependencies: []
332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355

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: []