Commit 216a5640 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[ci] use workflow rules

parent 6f2c1626
Pipeline #2685 passed with stages
in 10 minutes and 52 seconds
......@@ -7,22 +7,14 @@ stages:
- coverage
- deploy
# basic rules: we want to create pipelines for commits to master,
# tags, and merge requests, when sensible files have been edited.
.testrules:
# We want to create pipelines for commits to master, tags, and merge requests.
workflow:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_IID
changes:
- "**/*.hh"
- "**/*.cc"
- "**/CMakeLists.txt"
- "**/*.cmake"
- "**/*.yml"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
.build_tests:
extends: .testrules
stage: build
script: ./.ci_build_tests
artifacts:
......@@ -30,7 +22,6 @@ stages:
when: on_success
.run_tests:
extends: .testrules
stage: test
script: ctest -j 8 --no-tests=error --output-on-failure
......@@ -38,15 +29,9 @@ stages:
# build pipeline for docu #
###########################
# build docu always for master & tags. For
# merge requests, require manual trigger.
build_doc:
stage: build
script: ./.ci_build_doc
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG
- if: $CI_MERGE_REQUEST_IID
#####################################################
# build jobs for different compilers / occ versions #
......@@ -141,7 +126,6 @@ test clang-10 occ-7.5:
# we only define one job (use gcc-7 occ-7.3 build/run)
# and produce coverage reports only in commits to master
coverage report:
extends: .testrules
stage: coverage
needs:
- job: test gcc-7 occ-7.3
......@@ -158,17 +142,9 @@ coverage report:
expire_in: 30 minutes
# on master, create html page with the coverage report
# make sure that this pipeline is only created when a
# test pipeline is active. Thus, we require the same "changes"
pages:
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
changes:
- "**/*.hh"
- "**/*.cc"
- "**/CMakeLists.txt"
- "**/*.cmake"
- "**/*.yml"
stage: deploy
needs:
- job: coverage report
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment