forked from fmoessbauer/drace
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
223 lines (205 loc) · 5.68 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
.globals: &globals
tags:
- windows
- dynamorio
.testing: &testing
variables:
GIT_STRATEGY: "none"
variables:
PROJECT_NAME: "DRace"
GIT_SUBMODULE_STRATEGY: "normal"
DR_VERSION: "8.0.18640"
DR_ABI: "8.0"
_NT_SYMBOL_PATH: "SRV*c:\\symbolcache\\*https://msdl.microsoft.com/download/symbols"
http_proxy: $CODE_PROXY
https_proxy: $CODE_PROXY
no_proxy: code.siemens.com,docker.siemens.com,devops.bt.siemens.com
stages:
- inspect
- build
- test
- package
### non architecture dependent tasks ###
cppcheck:
<<: *globals
stage: test
script:
- cd win64-dr${DR_ABI}; C:\opt\Cppcheck\cppcheck.exe --project=compile_commands.json --enable=all --inline-suppr --suppressions-list=suppressions.txt --error-exitcode=1 --quiet
needs: ["windows_x64:compile"]
report-converter-test:
stage: test
tags:
- AWS
script:
- echo "Start test..."
- python3 tools/ReportConverter/ReportConverter.py -i tools/ReportConverter/test_files/helgrind.xml
- python3 tools/ReportConverter/ReportConverter.py --Debug
- python3 tools/ReportConverter/ReportConverterUnitTest.py
reuse-compliant:
stage: inspect
image: python:latest
tags:
- DOCKER
before_script:
- python3 -m venv ../venv
- . ../venv/bin/activate
- pip3 install fsfe-reuse
- git clean -f -d
script:
- reuse lint
code-style:
stage: inspect
tags:
- DOCKER
image: ubuntu:18.04
variables:
GIT_SUBMODULE_STRATEGY: "none"
script:
- echo "Check code-style..."
- apt-get update -y && apt-get install -y git clang-format
- bash ./contrib/format-files.sh ci
### CMake + Build ###
windows_x64:compile:
<<: *globals
stage: build
script:
- echo "Release build..."
- .\contrib\compile-win-x64.bat
artifacts:
paths:
- win64-dr${DR_ABI}
linux_x64:compile:
<<: *globals
stage: build
tags:
- DOCKER
image: docker.siemens.com/multicore/drace:buildamd64-ci
before_script:
- echo "Release build..."
- if [ ! -d "DynamoRIO-Linux-${DR_VERSION}" ]; then wget https://github.com/DynamoRIO/dynamorio/releases/download/cronbuild-${DR_VERSION}/DynamoRIO-Linux-${DR_VERSION}.tar.gz; fi
- if [ ! -d "DynamoRIO-Linux-${DR_VERSION}" ]; then tar -xf DynamoRIO-Linux-${DR_VERSION}.tar.gz; fi
script:
- sh ./contrib/compile-linux-x64.sh
cache:
key: dynamorio-cache-linux
paths:
- ./DynamoRIO-Linux-${DR_VERSION}
artifacts:
paths:
- linux-x86-64-dr${DR_ABI}
linux_i386:compile:
<<: *globals
stage: build
tags:
- DOCKER
image: docker.siemens.com/multicore/drace:buildi386-ci
before_script:
- echo "Release build..."
- if [ ! -d "DynamoRIO-Linux-${DR_VERSION}" ]; then wget https://github.com/DynamoRIO/dynamorio/releases/download/cronbuild-${DR_VERSION}/DynamoRIO-Linux-${DR_VERSION}.tar.gz; fi
- if [ ! -d "DynamoRIO-Linux-${DR_VERSION}" ]; then tar -xfDynamoRIO-Linux-${DR_VERSION}.tar.gz; fi
script:
- sh ./contrib/compile-linux-i386.sh
cache:
key: dynamorio-cache-linux
paths:
- ./DynamoRIO-Linux-${DR_VERSION}
artifacts:
paths:
- linux-i386-dr${DR_ABI}
### Test ###
windows_x64:test:
<<: *globals
<<: *testing
stage: test
script:
- cd win64-dr${DR_ABI}
- echo "Use DR ${DR_VERSION}"
# run only FT detector backend, as tsan often fails to alloc mem in low-memory environments
- ctest -j4 -T test --output-on-failure -E "tsan"
- ./bin/drace-system-tests.exe --gtest_output="xml:test-system-results.xml" --gtest_filter="*/0"
artifacts:
paths:
- win64-dr${DR_ABI}/*.xml
- win64-dr${DR_ABI}/Testing/**/Test.xml
reports:
junit:
- win64-dr${DR_ABI}/test-system-results.xml
- win64-dr${DR_ABI}/Testing/**/Test.xml
needs: ["windows_x64:compile"]
#once the integration tests in linux are working, uncomment integration tests
linux_x64:test:
<<: *globals
<<: *testing
stage: test
tags:
- DOCKER
image: docker.siemens.com/multicore/drace:buildamd64-ci
script:
- echo "Use DR ${DR_VERSION}"
- cd linux-x86-64-dr${DR_ABI}
- ctest -j4 -T test --output-on-failure
#- .\test\drace-system-tests --gtest_output="xml:test-system-results.xml"
artifacts:
paths:
#- linux-x86-64-dr${DR_ABI}/test-system-results.xml
- linux-x86-64-dr${DR_ABI}/Testing/**/Test.xml
reports:
junit:
#- linux-x86-64-dr${DR_ABI}/test-system-results.xml
- linux-x86-64-dr${DR_ABI}/Testing/**/Test.xml
needs: ["linux_x64:compile"]
linux_i386:test:
<<: *globals
<<: *testing
stage: test
tags:
- DOCKER
image: docker.siemens.com/multicore/drace:buildi386-ci
script:
- echo "Use DR ${DR_VERSION}"
- cd linux-i386-dr${DR_ABI}
- ctest -j4 -T test --output-on-failure
#- .\test\drace-system-tests --gtest_output="xml:test-system-results.xml"
artifacts:
paths:
#- linux-i386-dr${DR_ABI}/test-system-results.xml
- linux-i386-dr${DR_ABI}/Testing/**/Test.xml
reports:
junit:
#- linux-i386-dr${DR_ABI}/test-system-results.xml
- linux-i386-dr${DR_ABI}/Testing/**/Test.xml
needs: ["linux_i386:compile"]
# Package
windows_x64:bundle:
<<: *globals
stage: package
tags:
- DOCKER
# for packaging, we just need NPM, hence run in linux container
image: docker.siemens.com/multicore/drace:buildamd64-ci
script:
- echo "Generate Changelog"
- cd contrib && npx generate-changelog -f ../CHANGELOG
- cd .. && cp "CHANGELOG.md" "win64-dr${DR_ABI}/package/doc/"
dependencies:
- windows_x64:compile
- windows_x64:test
artifacts:
paths:
- win64-dr${DR_ABI}/package
pages:
stage: package
variables:
GIT_STRATEGY: "none"
needs:
- job: "windows_x64:compile"
artifacts: true
- job: "windows_x64:test"
artifacts: false
script:
- mv win64-dr${DR_ABI}/doc/html/ public/
artifacts:
paths:
- public
only:
- master