shithub: dav1d

ref: da5a5df86c334d60865898033ec17744e73d32dd
dir: /.gitlab-ci.yml/

View raw version
stages:
    - build
    - test

build-debian:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: build
    tags:
        - debian
        - amd64
    script:
        - meson build --buildtype release --werror
        - ninja -C build
        - cd build && meson test -v

build-debian-static:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: build
    tags:
        - debian
        - amd64
    script:
        - meson build --buildtype release --default-library static --werror
        - ninja -C build
        - cd build && meson test -v

build-win32:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: build
    tags:
        - win32
    script:
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/i686-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

build-win64:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: build
    tags:
        - win64
    script:
        - meson build --buildtype release
                      --werror
                      --libdir lib
                      --prefix "$(pwd)/build/dav1d_install"
                      --cross-file /opt/crossfiles/x86_64-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

build-debian-aarch64:
    stage: build
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
    tags:
        - aarch64
        - debian
    script:
        - meson build --buildtype release --werror
        - ninja -C build
        - cd build && meson test -v

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

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

build-debian-werror:
    image: registry.videolan.org:5000/dav1d-debian-unstable-aarch64:20181122182457
    stage: build
    tags:
        - aarch64
        - debian
    script:
        - env CC='clang-7' meson build --buildtype debug --werror
        - ninja -C build

test-debian:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: test
    tags:
        - debian
        - amd64
    cache:
        key: testdata.git
        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
        - ninja -C build
        - cd build && time meson test -v

test-debian-asan:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: test
    tags:
        - debian
        - amd64
    cache:
        key: testdata.git
        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
        - meson build --buildtype debugoptimized -Dtestdata_tests=true -Db_sanitize=address -Dbuild_asm=false
        - ninja -C build
        - cd build && time meson test -v --setup=sanitizer

test-debian-msan:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: test
    tags:
        - debian
        - amd64
    cache:
        key: testdata.git
        paths:
            - cache/dav1d-test-data.git/
    variables:
        MSAN_OPTIONS: 'exitcode=1'
    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
        - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Db_sanitize=memory -Db_lundef=false -Dbuild_asm=false
        - ninja -C build
        - cd build && time meson test -v --setup=sanitizer

test-debian-ubsan:
    image: registry.videolan.org:5000/dav1d-debian-unstable:20181114201132
    stage: test
    tags:
        - debian
        - amd64
    cache:
        key: testdata.git
        paths:
            - cache/dav1d-test-data.git/
    variables:
        UBSAN_OPTIONS: 'print_stacktrace=1:halt_on_error=1'
    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
        - env CC=clang meson build --buildtype debugoptimized -Dtestdata_tests=true -Db_sanitize=undefined -Db_lundef=false -Dbuild_asm=false
        - ninja -C build
        - cd build && time meson test -v --setup=sanitizer