-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
208 lines (190 loc) · 3.86 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
---
variables:
DOCKER_HOST: "tcp://docker:2375"
DOCKER_IMAGE: samconf-ci:$CI_COMMIT_REF_SLUG
workflow:
auto_cancel:
on_new_commit: interruptible
stages:
- docker-image
- build
- test
default:
image: $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
services:
- name: docker:24-dind
alias: docker
variables:
DOCKER_TLS_CERTDIR: ""
tags:
- "docker"
interruptible: true
before_script:
- env | sort
build-docker-image:
stage: docker-image
image: ubuntu:jammy
before_script:
- apt-get update
- apt-get install -y docker.io
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $DOCKER_IMAGE -f ci/Dockerfile
--build-arg UID=$(id -u) --build-arg GID=$(id -g)
--build-arg ASMCOV_URI="$ASMCOV_URI"
ci/
- docker tag $DOCKER_IMAGE $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
- docker push $CI_REGISTRY_IMAGE/$DOCKER_IMAGE
build-dependencies:
stage: build
needs:
- build-docker-image
script:
- ci/install_deps.py -c ci/dependencies_emlix.json
artifacts:
paths:
- build/deps/lib/
- build/deps/include/
build-release:
stage: build
needs:
- build-docker-image
- build-dependencies
script:
- ci/build.sh --ci Release
artifacts:
paths:
- build/Release/dist/
- build/Release/cmake/
exclude:
- build/deps/src/
build-debug:
stage: build
needs:
- build-docker-image
- build-dependencies
script:
- ci/build.sh --ci Debug
artifacts:
paths:
- build/Debug/dist/
- build/Debug/cmake/
unit-test-release:
stage: test
needs:
- build-docker-image
- build-release
- build-dependencies
script:
- ci/run_utest.sh Release
artifacts:
when: always
paths:
- build/Release/result/unit_test/
reports:
junit: build/Release/result/unit_test/junit.xml
unit-test-debug:
stage: test
needs:
- build-docker-image
- build-debug
- build-dependencies
script:
- ci/run_utest.sh Debug
artifacts:
when: always
paths:
- build/Debug/result/unit_test/
reports:
junit: build/Debug/result/unit_test/junit.xml
smoketest-test-release:
stage: test
needs:
- build-docker-image
- build-release
- build-dependencies
script:
- ci/run_smoketests.sh Release
artifacts:
when: always
paths:
- build/Release/result/smoketest/
smoketest-test-debug:
stage: test
needs:
- build-docker-image
- build-debug
- build-dependencies
script:
- ci/run_smoketests.sh Debug
artifacts:
when: always
paths:
- build/Debug/result/smoketest/
code-lint:
stage: test
needs:
- build-docker-image
- build-release
- build-dependencies
script:
- ci/code_lint.py --ci
- ci/checklicense.sh
artifacts:
when: always
paths:
- build/Release/cmake/lint_results/
code-coverage:
stage: test
tags:
- "intelpt"
- "docker"
needs:
- build-docker-image
- build-release
- build-dependencies
script:
- cat /proc/cpuinfo
- ls -lah /sys/devices/intel_pt
- ci/create_coverage.sh
artifacts:
when: always
paths:
- build/Release/result/coverage_results/
publish-kpis:
stage: test
needs:
- build-docker-image
- build-release
- code-coverage
script:
- ci/publish_kpis.sh
documentation:
stage: build
needs:
- build-docker-image
- build-release
- build-dependencies
script:
- ci/build_doc.sh
artifacts:
paths:
- build/Release/doc/
build-deb-packages:
parallel:
matrix:
- OS: ubuntu
CODENAME: jammy
- OS: ubuntu
CODENAME: noble
# Override default before_script
before_script: ""
stage: build
image: ${OS}:${CODENAME}
script:
- ci/build_debs.sh ${CODENAME}
artifacts:
paths:
- ./*.deb
needs: []
allow_failure: true