-
Notifications
You must be signed in to change notification settings - Fork 43
/
.gitlab-ci.yml
52 lines (48 loc) · 1.11 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
image: ubuntu:18.04
stages:
- build
- test
build:unittests:
variables:
GIT_SUBMODULE_STRATEGY: none
stage: build
before_script:
- apt-get update -qq && apt-get -qq -y install g++ cmake git
script:
- mkdir -p build
- cd build
- cmake -DENABLE_UNITTEST=ON -DBUILD_DOC=OFF -DBUILD_ONLY_COMMON=ON -DUSE_ABC=OFF ..
- make unittests
artifacts:
name: unittest_bin
paths:
- build/common/test/unittests
expire_in: 2 days
test:single_exec:
variables:
GIT_STRATEGY: none
stage: test
script:
- ./build/common/test/unittests --gtest_output="xml:report.xml"
dependencies:
- build:unittests
artifacts:
reports:
junit: report.xml
when: on_success
expire_in: 2 weeks
test:many_exec:
variables:
GIT_STRATEGY: none
stage: test
script:
- ./build/common/test/unittests --gtest_filter=-*_single --gtest_repeat=1000 --gtest_shuffle --gtest_random_seed=42 > unittest.log
- tail -n 20 unittest.log
dependencies:
- build:unittests
artifacts:
name: unittest_log
paths:
- unittest.log
when: on_failure
expire_in: 2 weeks