Skip to content
Snippets Groups Projects
Commit 41099d07 authored by Soeren Peters's avatar Soeren Peters
Browse files

Use workflow in CI to always disable detached MR pipelines. Enable running...

Use workflow in CI to always disable detached MR pipelines. Enable running clang build analyzer and IWYU manual.
parent a2058931
No related branches found
No related tags found
1 merge request!237Adds Ubuntu 22_04 image.
......@@ -13,6 +13,11 @@ stages:
- deploy
- release
workflow:
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never # disable detached merge request pipelines
- when: always # add all jobs to normal pipeline. This can be overwritten by the rules of the jobs.
###############################################################################
## Builds ##
......@@ -393,13 +398,22 @@ gpu_numerical_tests:
###############################################################################
## Code analysis ##
###############################################################################
clang_build_analyzer_clang_10:
.analyze_template:
stage: analyze
only: ["schedules"]
needs: []
rules:
- if: '$CI_PROJECT_NAMESPACE == "irmb" && $CI_COMMIT_BRANCH == "develop"'
when: always
- if: '$CI_PROJECT_NAMESPACE != "irmb"'
when: manual
allow_failure: true
clang_build_analyzer_clang_10:
extends: .analyze_template
before_script:
- export CC=clang
- export CXX=clang++
......@@ -425,11 +439,7 @@ clang_build_analyzer_clang_10:
###############################################################################
include_what_you_use_clang_15:
stage: analyze
only: ["schedules"]
needs: []
extends: .analyze_template
before_script:
- export CC=clang
......@@ -453,23 +463,9 @@ include_what_you_use_clang_15:
- make
###############################################################################
.analyze_template:
rules: # dont create MR pipeline, run always on irmb/develop and manual in all other cases
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: never
- if: '$CI_PROJECT_NAMESPACE == "irmb" && $CI_COMMIT_BRANCH == "develop"'
when: always
- when: manual
allow_failure: true
cppcheck:
stage: analyze
extends: .analyze_template
needs: []
before_script:
- apt-get update && apt-get install -y libpcre3-dev
- chmod +x utilities/install-cppcheck.sh
......@@ -489,12 +485,8 @@ cppcheck:
# lizard - Cyclomatic Complexity Analyzer
# Ignore warnings is manually set to 191. This job will fail when new warnings are added.
lizard:
stage: analyze
extends: .analyze_template
needs: []
before_script:
- lizard --version
......@@ -514,8 +506,6 @@ gcov_gcc:
extends: .analyze_template
needs: []
before_script:
- gcovr --version
- export CC=/usr/bin/gcc-11
......@@ -552,14 +542,8 @@ gcov_gcc:
###############################################################################
# this job also produces a compile commands json file.
clang-tidy:
stage: analyze
extends: .analyze_template
needs: []
allow_failure: true
before_script:
- run-clang-tidy-15 -h
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment