.gitlab-ci.yml 879 Bytes
Newer Older
1
image: rtsn/test:latest
2
3

stages:
Jannick Wolters's avatar
Jannick Wolters committed
4
  - unit_tests
5

Jannick Wolters's avatar
Jannick Wolters committed
6
7
unit_tests:
  stage: unit_tests
8
  script:
9
10
    - git submodule update --init --recursive
    - cd code/build/release
jannick.wolters's avatar
jannick.wolters committed
11
    - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ../../
12
    - ninja
jannick.wolters's avatar
jannick.wolters committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    - OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml
    - gcovr -e ../../ext/ -e ../../tests/ -r ../../
  artifacts:
    when: always
    paths:
      - code/build/release/unit_tests_report.xml
    reports:
      junit: code/build/release/unit_tests_report.xml
  timeout: 4h
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH == "master" || $CI_COMMIT_BRANCH == "develop"
      changes:
        - "code/include/**/*"
        - "code/tests/**/*"
        - "code/src/**/*"
        - "code/CMakeLists.txt"
        - "scripts/Dockerfile"
        - ".gitmodules"
    - if: $CI_PIPELINE_SOURCE == "web"