From 1f391e11ebe5c95d1a89471651eb602de7ccfb0d Mon Sep 17 00:00:00 2001
From: kongr45gpen <electrovesta@gmail.com>
Date: Tue, 13 Nov 2018 02:53:46 +0200
Subject: [PATCH] Move continous integration to separate .sh files

---
 .gitlab-ci.yml   |  6 +++---
 ci/clang-tidy.sh | 11 +++++++++++
 ci/cppcheck.sh   | 11 +++++++++++
 ci/vera.sh       | 11 +++++++++++
 4 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100755 ci/clang-tidy.sh
 create mode 100755 ci/cppcheck.sh
 create mode 100755 ci/vera.sh

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6012aca0..06f1d62e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,12 +17,12 @@ build:
 
 cppcheck:
   script:
-    - cppcheck --enable=all --error-exitcode=1 -I inc src
+    - bash -x ci/cppcheck.sh
 
 vera:
   script:
-    - vera++ --error --profile custom `find src inc -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'`
+    - bash -x ci/vera.sh
 
 clang-tidy:
   script:
-    - cd ci && clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` -- -std=c++11 -I../inc
+    - bash -x ci/clang-tidy.sh
diff --git a/ci/clang-tidy.sh b/ci/clang-tidy.sh
new file mode 100755
index 00000000..051a2a9b
--- /dev/null
+++ b/ci/clang-tidy.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+#
+# Code style checks using clang-tidy
+#
+# Usage:
+# $ ci/clang-tidy.sh
+#
+
+cd "$(dirname "$0")"
+clang-tidy `find ../src/ -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'` -- -std=c++11 -I../inc
diff --git a/ci/cppcheck.sh b/ci/cppcheck.sh
new file mode 100755
index 00000000..d441040a
--- /dev/null
+++ b/ci/cppcheck.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+#
+# Static code analysis using cppchecl
+#
+# Usage:
+# $ ci/cppcheck.sh
+#
+
+cd "$(dirname "$0")/.."
+cppcheck --enable=all --error-exitcode=1 -I inc src
diff --git a/ci/vera.sh b/ci/vera.sh
new file mode 100755
index 00000000..0e2451bf
--- /dev/null
+++ b/ci/vera.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+#
+# Code style checks using vera++
+#
+# Usage:
+# $ ci/vera.sh
+#
+
+cd "$(dirname "$0")/.."
+vera++ --error --profile custom `find src inc -type f -regextype posix-egrep -regex '.*\.(cpp|hpp|c|h)'`
-- 
GitLab