-
Notifications
You must be signed in to change notification settings - Fork 16
/
.gitlab-ci.yml
225 lines (202 loc) · 5.76 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
workflow:
rules:
- if: $CI_MERGE_REQUEST_ID
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == "master" && $CI_COMMIT_TITLE != $DOCS_AUTOCOMMIT_TITLE
- if: $CI_COMMIT_BRANCH =~ /^columnar-.*$/ && $CI_COMMIT_TITLE != $DOCS_AUTOCOMMIT_TITLE
- if: $CI_PIPELINE_SOURCE == "schedule"
# to skip ci: git push -o ci.skip ...
# global settings will be applied to all jobs
variables:
VERBOSE: 1
DIAGNOSTIC: 1
stages:
- mirroring
- routines
- ubertests
- publish
- hooks
# ==================== Mirror repo to github (only 'master' branch) ======================
job_mirror:
stage: mirroring
rules:
- if: $CI_COMMIT_BRANCH == "master"
- if: $CI_COMMIT_BRANCH =~ /^columnar-.*$/
tags:
- dev-host
dependencies: []
script:
- ./gitsync_columnar.sh
cache: {}
# ==================== .helper build ======================
.build:
stage: routines
interruptible: true
needs: [ ]
tags:
- docker-free
image: manticoresearch/external_toolchain:clang15_cmake3263
variables:
CACHEB: $CI_PROJECT_DIR/cache
NO_TESTS: 1
CTEST_CMAKE_GENERATOR: Ninja
DISTR: bionic # our default build for tests
arch: x86_64
boost: boost_nov22
sysroot: roots_nov22
script:
- ctest -VV -S cmake/citest.cmake --no-compress-output
after_script:
- cd build && mkdir xml
- cp -r Testing/2*/*.xml xml
cache:
paths:
- $CI_PROJECT_DIR/cache
key: bionic_test
artifacts:
when: on_success
expire_in: 12 hrs
paths:
- build/xml
- build/columnar/lib_manticore_columnar.so
- build/secondary/lib_manticore_secondary.so
- build/_deps/manticore-build/src/searchd
- build/_deps/manticore-build/src/indexer
- build/_deps/manticore-build/src/indextool
- build/_deps/manticore-build/config/*.c
- build/_deps/manticore-build/config/*.h
# ==================== .helper testing ======================
.tests:
stage: ubertests
needs: [ ]
tags:
- specdocker
image: manticoresearch/ubertests_ctest:3263
variables:
CACHEB: $CI_PROJECT_DIR/cache
NO_BUILD: 1
script:
- ctest -V -S cmake/citest.cmake --no-compress-output
after_script:
- cd build
- cp -r Testing/2*/Test.xml .
- xsltproc -o junit_tests.xml ../misc/junit/ctest2junit.xsl Test.xml
cache:
key: bionic_test
paths:
- $CI_PROJECT_DIR/cache
artifacts:
expire_in: 12 hrs
when: always
reports:
junit: build/junit_tests.xml
paths:
- build/junit_tests.xml
- build/_deps/manticore-build/test/test_*/report.txt
- build/_deps/manticore-build/test/test_*/report.bin
- build/_deps/manticore-build/test/error*.txt
- build/_deps/manticore-build/test/searchd.log
retry: 1
# ==================== Simple build, then test ======================
simple_build:
extends: [ .build ]
variables:
CTEST_CONFIGURATION_TYPE: Debug
simple_tests:
extends: [ .tests ]
needs: [ simple_build ]
variables:
CTEST_CONFIGURATION_TYPE: Debug
# ==================== Release build, then test ======================
release_build:
extends: [ .build ]
variables:
CMAKE_INTERPROCEDURAL_OPTIMIZATION: 1
CTEST_CONFIGURATION_TYPE: RelWithDebInfo
release_tests:
extends: [ .tests ]
needs: [ release_build ]
variables:
CTEST_CONFIGURATION_TYPE: RelWithDebInfo
# ==================== Windows build, then test ======================
win_build:
extends: [ .build ]
variables:
DISTR: windows
arch: x64
CTEST_CMAKE_GENERATOR: "Ninja Multi-Config"
CTEST_CONFIGURATION_TYPE: Debug
artifacts:
paths:
- build/xml
- build/columnar/$CTEST_CONFIGURATION_TYPE/lib_manticore_columnar.dll
- build/secondary/$CTEST_CONFIGURATION_TYPE/lib_manticore_secondary.dll
- build/_deps/manticore-build/src/$CTEST_CONFIGURATION_TYPE/indexer.exe
- build/_deps/manticore-build/src/$CTEST_CONFIGURATION_TYPE/searchd.exe
# Commented out usually need, but not on our dev where everything is installed into system
# - build/_deps/manticore-build/src/$CTEST_CONFIGURATION_TYPE/*.dll
# - build/_deps/manticore-build/src/gtests/$CTEST_CONFIGURATION_TYPE/*.dll
cache:
key: win_test
win_tests:
stage: ubertests
needs: [ win_build ]
tags:
- windev19
variables:
LIBS_BUNDLE: "x:/bundle"
CACHEB: "x:/cache"
BOOST_ROOT: "x:/boost_1_75_0"
CTEST_CMAKE_GENERATOR: "Visual Studio 16 2019"
CTEST_CONFIGURATION_TYPE: Debug
CTEST_EXCLUDE_REGEX: "_466"
NO_BUILD: 1
script:
- 'net use x: \\\\VBOXSRV\\shared'
- ctest -VV -S cmake/citest.cmake -C $CTEST_CONFIGURATION_TYPE --no-compress-output
after_script:
- cd build
- cp -r Testing/2*/*.xml xml
artifacts:
expire_in: 12 hrs
when: always
paths:
- build/xml
- build/_deps/manticore-build/test/test_*/report.txt
- build/_deps/manticore-build/test/test_*/report.bin
- build/_deps/manticore-build/test/error*.txt
- build/_deps/manticore-build/test/searchd.log
cache: { }
# ==================== Publish (push) pipeline results ======================
# build and upload on regular commits
convert_win_junit:
stage: publish
tags:
- docker
image: manticoresearch/ubertests_ctest:3263
needs:
- win_tests
variables:
GIT_STRATEGY: fetch
script:
- xsltproc -o build/junit_tests.xml misc/junit/ctest2junit.xsl build/xml/Test.xml
artifacts:
paths:
- build/junit_tests.xml
reports:
junit: build/junit_tests.xml
cache: { }
# ==================== Run secondary pipeline ======================
#deploy_hook:
# stage: hooks
# rules:
# - if: $CI_PIPELINE_SOURCE != "schedule"
# trigger:
# include: packaging.yml
# needs:
# - job: simple_tests
# artifacts: false
# - job: release_tests
# artifacts: false
# - job: win_tests
# artifacts: false