drm_hwcomposer: Add pass/fail CI step for clang format-diff
Signed-off-by: Stefan Schake <stschake@gmail.com>
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..144eb2e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,18 @@
+image: ubuntu:16.04
+
+before_script:
+ - apt-get --quiet update --yes >/dev/null
+ - apt-get --quiet install --yes clang-format-3.5 git >/dev/null
+
+stages:
+ - style
+
+clang-format:
+ stage: style
+ script:
+ - git diff -U --no-color master...HEAD | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch
+ - if [ -s format-fixup.patch ]; then cat format-fixup.patch && exit 1; fi
+ artifacts:
+ when: on_failure
+ paths:
+ - format-fixup.patch