diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9c0d8cff6039180cf8931e10d5b0730937fe621f..9cbd9bf74d527dc5138022ced77836bb90798266 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,13 @@ before_script: $tool --version done +variables: + BUILDDTYPE: debugoptmized + CC: gcc + CXX: g++ + EXTRA_NINJA_ARGS: -v + EMPER_IO: "false" + stages: - smoke-test - test @@ -29,12 +36,11 @@ smoke-test: stage: smoke-test script: make smoke-test -variables: - BUILDDTYPE: debugoptmized - CC: gcc - CXX: g++ - EXTRA_NINJA_ARGS: -v - EMPER_IO: "false" +static-analysis-with-emper-io: + stage: smoke-test + script: make static-analysis + variables: + EMPER_IO: "true" .test: stage: test diff --git a/Makefile b/Makefile index 15b726d9d4c282107bf40071c1ca789423d4f61c..efbfa488cd458bdf70e1b9978481897c6cad406e 100644 --- a/Makefile +++ b/Makefile @@ -30,21 +30,22 @@ debug: rm -f build $(MAKE) build BUILDTYPE=$@ -SMOKE_TEST_NINJA_TARGETS += iwyu +STATIC_ANALYSIS_NINJA_TARGETS += iwyu # Meson >= 0.52 will automatically generate a clang-tidy target if a # .clang-tidy file is found. # Source version check: https://stackoverflow.com/a/3732456/194894 ifeq ($(shell [ $(MESON_MINOR_VERSION) -ge 52 ] && echo true), true) -SMOKE_TEST_NINJA_TARGETS += clang-tidy +STATIC_ANALYSIS_NINJA_TARGETS += clang-tidy else $(warning old mesion version $(MESON_VERSION) detected, meson >= 0.52 required for clang-tidy) endif -smoke-test: all check-format check-license doc - cd build && meson test --suite smoke - $(NINJA) -C build $(SMOKE_TEST_NINJA_TARGETS) +static-analysis: all + $(NINJA) -C build $(STATIC_ANALYSIS_NINJA_TARGETS) +smoke-test: all check-format check-license doc static-analysis + cd build && meson test --suite smoke TEST_NINJA_TARGETS += test