Commit cceaaf30 authored by David Frank's avatar David Frank Committed by Tobias Lasser

#58 Configure jobs to run before merging

- Static analysis, compile, build and running tests will always be performed
- Dynamic analysis (memory sanitizers and such) are run for merge requests and schedules
- Docs are only run for schedules
parent 2234549b
Pipeline #269927 passed with stages
in 57 minutes and 40 seconds
...@@ -19,18 +19,36 @@ variables: ...@@ -19,18 +19,36 @@ variables:
### job templates ### ### job templates ###
# run job only if it's connected to a schedule
.job_template: &nightly_job .job_template: &nightly_job
only: only:
- schedules - schedules
.job_template: &build_job # run job if conntect to a schedule, merge request or some other things
stage: compile .job_template: &run_on_merge_requests
cache: only:
key: "$CI_JOB_NAME" - merge_requests
paths: - schedules
- build/ - master
- web
- triggers
- api
# always run this job
.job_template: &run_always
only:
- merge_requests
- branches
- tags
- api
- pushes
- schedules
- triggers
- web
.job_template: &build_job_artifact .job_template: &build_job_artifact
<<: *run_always
stage: compile stage: compile
cache: cache:
key: "$CI_JOB_NAME" key: "$CI_JOB_NAME"
...@@ -57,6 +75,7 @@ variables: ...@@ -57,6 +75,7 @@ variables:
- ninja - ninja
.job_template: &test_job_artifact .job_template: &test_job_artifact
<<: *run_always
script: script:
- cd build - cd build
- cmake -GNinja -DELSA_CREATE_JUNIT_REPORTS=ON .. - cmake -GNinja -DELSA_CREATE_JUNIT_REPORTS=ON ..
...@@ -69,6 +88,7 @@ variables: ...@@ -69,6 +88,7 @@ variables:
### static test ### ### static test ###
clang-format: clang-format:
<<: *run_always
stage: static-test stage: static-test
image: $ANALYSIS_IMAGE image: $ANALYSIS_IMAGE
script: script:
...@@ -79,6 +99,7 @@ clang-format: ...@@ -79,6 +99,7 @@ clang-format:
- clang - clang
clang-tidy: clang-tidy:
<<: *run_always
stage: static-test stage: static-test
image: $ANALYSIS_IMAGE image: $ANALYSIS_IMAGE
script: script:
...@@ -189,6 +210,7 @@ test-cuda: ...@@ -189,6 +210,7 @@ test-cuda:
- cuda - cuda
test-gpu-only: test-gpu-only:
<<: *run_always
stage: test stage: test
image: $GPU_ONLY_IMAGE image: $GPU_ONLY_IMAGE
dependencies: dependencies:
...@@ -214,6 +236,7 @@ test-gpu-only: ...@@ -214,6 +236,7 @@ test-gpu-only:
### sanitizers ### ### sanitizers ###
cuda-memcheck: cuda-memcheck:
<<: *run_on_merge_requests
stage: sanitizer stage: sanitizer
image: $GPU_ONLY_IMAGE image: $GPU_ONLY_IMAGE
script: script:
...@@ -227,7 +250,7 @@ cuda-memcheck: ...@@ -227,7 +250,7 @@ cuda-memcheck:
- cuda - cuda
asan-ubsan: asan-ubsan:
<<: *nightly_job <<: *run_on_merge_requests
stage: sanitizer stage: sanitizer
image: $CUDA_IMAGE image: $CUDA_IMAGE
script: script:
...@@ -246,7 +269,7 @@ asan-ubsan: ...@@ -246,7 +269,7 @@ asan-ubsan:
### test coverage ### ### test coverage ###
test-coverage: test-coverage:
<<: *nightly_job <<: *run_on_merge_requests
stage: coverage stage: coverage
image: $CUDA_IMAGE image: $CUDA_IMAGE
dependencies: [] dependencies: []
......
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