.gitlab-ci.yml 890 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
    - git submodule update --init --recursive
10
11
    - cd code/build/debug
    - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ../../
12
    - ninja
jannick.wolters's avatar
jannick.wolters committed
13
14
15
16
17
    - OMP_NUM_THREADS=1 ./unit_tests -r junit > unit_tests_report.xml
    - gcovr -e ../../ext/ -e ../../tests/ -r ../../
  artifacts:
    when: always
    paths:
18
      - code/build/debug/unit_tests_report.xml
jannick.wolters's avatar
jannick.wolters committed
19
    reports:
20
      junit: code/build/debug/unit_tests_report.xml
jannick.wolters's avatar
jannick.wolters committed
21
22
23
24
25
26
27
28
29
30
31
  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"