From 02ecb7226d1740b47cc8d5e30dd9d6bd71c32404 Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Mon, 1 Mar 2021 08:52:55 +0100
Subject: [PATCH] [gitlab-ci] Factor iwyu & clang-tidy out of the
 static-analysis task

This should improve the CI response time, as we now (potentially)
perform iwyu and clang-tidy in parallel.
---
 .gitlab-ci.yml | 22 +++++++++++++++++-----
 Makefile       |  5 ++++-
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 41cb9bff..3d4eb474 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,11 +36,23 @@ smoke-test-suite:
   stage: smoke-test
   script: make smoke-test-suite
 
-static-analysis-with-emper-io:
-  stage: smoke-test
-  script: make static-analysis
-  variables:
-      EMPER_IO: "true"
+fast-static-analysis:
+   stage: smoke-test
+   script: make fast-static-analysis
+   variables:
+       EMPER_IO: "true"
+
+iwyu:
+   stage: smoke-test
+   script: make iwyu
+   variables:
+       EMPER_IO: "true"
+
+clang-tidy:
+   stage: smoke-test
+   script: make tidy
+   variables:
+       EMPER_IO: "true"
 
 .test:
   stage: test
diff --git a/Makefile b/Makefile
index f66fcb8f..432d6fcf 100644
--- a/Makefile
+++ b/Makefile
@@ -41,8 +41,11 @@ else
 $(warning old mesion version $(MESON_VERSION) detected, meson >= 0.52 required for clang-tidy)
 endif
 
+.PHONY: fast-static-analysis
+fast-static-analysis: all check-format check-license doc
+
 .PHONY: static-analysis
-static-analysis: all check-format check-license doc
+static-analysis: fast-static-analysis
 	$(NINJA) -C build $(STATIC_ANALYSIS_NINJA_TARGETS)
 
 .PHONY: smoke-test-suite
-- 
GitLab