aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorStefan Schake <stschake@gmail.com>2018-05-05 02:39:33 +0200
committerSean Paul <seanpaul@chromium.org>2018-05-07 17:25:37 +0000
commit02346787b1517a70d675b48e947f472a37bdebe0 (patch)
tree6252feaafcd7592096fa91fdbdea8dba0aadd35f /.gitlab-ci.yml
parent4fc1b5394389cd46d78836328774d21f3cfa2e46 (diff)
downloaddrm_hwcomposer-02346787b1517a70d675b48e947f472a37bdebe0.tar.gz
drm_hwcomposer: Add pass/fail CI step for clang format-diff
Signed-off-by: Stefan Schake <stschake@gmail.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml18
1 files changed, 18 insertions, 0 deletions
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