.gitlab-ci.yml 549 Bytes
Newer Older
1 2 3 4
image: ubuntu:16.04

before_script:
  - apt-get --quiet update --yes >/dev/null
5
  - apt-get --quiet install --yes clang-format-5.0 git >/dev/null
6 7 8 9 10 11 12

stages:
  - style

clang-format:
  stage: style
  script:
13
    - git fetch https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer.git
14
    - git diff -U0 --no-color FETCH_HEAD...HEAD -- | clang-format-diff-5.0 -p 1 -style=file > format-fixup.patch
15 16 17 18 19
    - if [ -s format-fixup.patch ]; then cat format-fixup.patch && exit 1; fi
  artifacts:
    when: on_failure
    paths:
      - format-fixup.patch