-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
306 lines (261 loc) · 7.33 KB
/
.gitlab-ci.yml
File metadata and controls
306 lines (261 loc) · 7.33 KB
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
include:
- '/support/docker/tuxmake-images.yml'
- '/support/docker/tuxmake-ci-images.yml'
image:
name: $CI_REGISTRY/linaro/tuxmake/ci-debian-11
variables:
LANG: C.UTF-8
.tuxmake:
except:
- schedules
.arm64:
only:
- branches@Linaro/tuxmake
tags:
- saas-linux-medium-arm64
stages:
- build-ci-images
- publish-ci-images
- unit-tests
- code-checks
- integration-tests
- build-base
- publish-base
- build
- publish
.unit-tests:
extends: .tuxmake
needs: []
stage: unit-tests
script:
- make unit-tests
unit-tests-python3.11:
extends: .unit-tests
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-12
unit-tests-python3.10:
extends: .unit-tests
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-22.04
unit-tests-python3.9:
extends: .unit-tests
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-11
unit-tests-python3.8:
extends: .unit-tests
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-20.04
unit-tests-python3.7:
extends: .unit-tests
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-10
unit-tests-python3.6:
extends: .unit-tests
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-18.04
unit-tests-python3.11-arm64:
extends: [.unit-tests, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-12
unit-tests-python3.10-arm64:
extends: [.unit-tests, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-22.04
unit-tests-python3.9-arm64:
extends: [.unit-tests, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-11
unit-tests-python3.8-arm64:
extends: [.unit-tests, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-20.04
unit-tests-python3.7-arm64:
extends: [.unit-tests, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-10
unit-tests-python3.6-arm64:
extends: [.unit-tests, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-18.04
.code-checks:
extends: .tuxmake
stage: code-checks
needs: []
style:
extends: .code-checks
script:
- make style
typecheck:
extends: .code-checks
script:
- make typecheck
codespell:
extends: .code-checks
script:
- make codespell
docker-build-tests:
extends: .code-checks
script:
- make docker-build-tests
.integration:
extends: .tuxmake
stage: integration-tests
needs: []
before_script:
- git status
- rm -rf dist/
- flit --debug build
- python3 -m pip install dist/*.whl
script:
- make integration-tests TMV=1
.integration-break-system-packages:
extends: .integration
before_script:
- git status
- rm -rf dist/
- flit --debug build
- python3 -m pip install dist/*.whl --break-system-packages
integration-python3.11:
extends: .integration-break-system-packages
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-12
integration-python3.10:
extends: .integration
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-22.04
integration-python3.9:
extends: .integration
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-11
integration-python3.8:
extends: .integration
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-20.04
integration-python3.7:
extends: .integration
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-10
integration-python3.6:
extends: .integration
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-10
integration-python3.11-arm64:
extends: [.integration-break-system-packages, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-12
integration-python3.10-arm64:
extends: [.integration, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-22.04
integration-python3.9-arm64:
extends: [.integration, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-11
integration-python3.8-arm64:
extends: [.integration, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-20.04
integration-python3.7-arm64:
extends: [.integration, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-10
integration-python3.6-arm64:
extends: [.integration, .arm64]
image: $CI_REGISTRY/linaro/tuxmake/ci-ubuntu-18.04
integration-docker:
extends: integration-python3.8
services:
- name: docker:20.10-dind
variables:
DOCKER_HOST: tcp://docker:2375
script:
# Run integration tests as a non-root user, on purpose. HOME and TMPDIR
# must be inside $(pwd) so that they are available to the docker server
# (which is running in a separate container)
- mkdir -p nobody/home nobody/tmp
- chown -R nobody:nogroup nobody
- runuser -u nobody make integration-tests-docker TMV=1 HOME=$(pwd)/nobody TMPDIR=$(pwd)/nobody/tmp
build-docs:
extends: .tuxmake
stage: build
needs: []
image: $CI_REGISTRY/linaro/tuxmake/ci-debian-11
before_script:
- apt-get update -q
- python3 -m pip install mkautodoc mkdocs-material # FIXME not in Debian
script:
- make man
- make doc
artifacts:
paths:
- public
pages:
stage: publish
needs:
- build-docs
- packages
artifacts:
paths:
- public
only:
- tags
script:
# TUXMAKE_RELEASE_MANAGERS_GPG_KEYS is defined on gitlab, in the CI/CD
# settings, section "Variables"
- for key in ${TUXMAKE_RELEASE_MANAGERS_GPG_KEYS[@]}; do wget -O - https://keys.openpgp.org/vks/v1/by-fingerprint/${key} | gpg --import; done
- git tag --verify ${CI_COMMIT_TAG}
- cp -r dist/repo public/packages
rpm:
extends: .tuxmake
stage: integration-tests
image: fedora
script:
- dnf install -y dnf-plugins-core rpm-build crontabs shunit2 gcc-x86_64-linux-gnu gcc-aarch64-linux-gnu ccache clang lld which
- dnf builddep -y tuxmake.spec
- make rpm
- rpm --install dist/tuxmake*.rpm
- make integration-tests
artifacts:
paths:
- dist/*.rpm
deb:
extends: .tuxmake
stage: integration-tests
image: debian:testing
script:
- apt-get update
- apt-get install -qy auto-apt-proxy
- apt-get install -qy shunit2 gcc-x86-64-linux-gnu gcc-aarch64-linux-gnu ccache clang lld
- apt-get build-dep -qy .
- make deb
- apt-get install -qy ./dist/tuxmake*.deb
- make integration-tests
artifacts:
paths:
- dist/*.deb
pkg:
extends: .tuxmake
stage: integration-tests
image: archlinux:base-devel
script:
- sed -i '/^NoExtract/d' /etc/pacman.conf
- pacman -Syyu --noconfirm
- pacman -S --noconfirm git glibc python-flit
- echo "C.UTF-8 UTF-8" >/etc/locale.gen
- locale-gen
- useradd -m build
- "echo 'build ALL=(ALL) NOPASSWD: ALL' >/etc/sudoers.d/build"
- su build -c "git config --global --add safe.directory ${CI_PROJECT_DIR}; make pkg"
- pacman -U --noconfirm dist/*.pkg.tar.zst
- pacman -S --noconfirm aarch64-linux-gnu-gcc ccache clang diffoscope libfaketime lld llvm socat shunit2
- for binary in as ld; do ln -sv /usr/bin/$binary /usr/bin/x86_64-linux-gnu-$binary; done
- make integration-tests
artifacts:
paths:
- dist/*.pkg.tar.zst
packages:
image: debian:bullseye
stage: build
extends: .tuxmake
only:
- tags
needs:
- deb
- rpm
script:
- apt-get update
- apt-get install --no-install-recommends -qy dpkg-dev apt-utils createrepo-c rpm gpg gpg-agent
- gpg --batch --import ${TUXMAKE_RELEASE_KEY}
- ./scripts/package-repos
artifacts:
paths:
- dist/repo
trigger_tuxsuite:
stage: .post
image: debian:bullseye
before_script:
- apt update
- apt install -y curl
script:
- "curl -X POST -F token=$TUXSUITE_PACKAGES_TRIGGER_TOKEN -F ref=master https://gitlab.com/api/v4/projects/13070238/trigger/pipeline"
only:
- tags
needs:
- packages