File: .gitlab-ci.yml

package info (click to toggle)
intel-gpu-tools 2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 63,360 kB
  • sloc: xml: 781,458; ansic: 360,567; python: 8,336; yacc: 2,781; perl: 1,196; sh: 1,177; lex: 487; asm: 227; lisp: 35; makefile: 30
file content (262 lines) | stat: -rw-r--r-- 7,554 bytes parent folder | download
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
image: $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA
variables:
  BUILDAH_FORMAT: docker
  BUILDAH_ISOLATION: chroot
  BUILD_CONTAINERS_IMAGE: $CI_REGISTRY/$CI_PROJECT_PATH/build-buildah:latest
  MESON_OPTIONS: >
    -Dlibdrm_drivers=intel,nouveau,amdgpu
    -Doverlay=enabled
    -Dchamelium=enabled
    -Dvalgrind=enabled
    -Dman=enabled
    -Dtests=enabled
    -Drunner=enabled
    -Dlibunwind=enabled
  LANG: "C.UTF-8"

stages:
  - build-base
  - build-containers
  - build
  - test
  - containers
  - deploy

############### BUILD BASE CONTAINER #####################

build-base:build-buildah:
  stage: build-base
  image: quay.io/buildah/stable
  rules:
    - if: $CI_PIPELINE_SOURCE == "push"
      changes:
        - Dockerfile.build-buildah
  script:
    - buildah bud --squash -t $BUILD_CONTAINERS_IMAGE -f Dockerfile.build-buildah .
    - buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $BUILD_CONTAINERS_IMAGE docker://$BUILD_CONTAINERS_IMAGE

build-base:build-buildah-manual:
  extends: build-base:build-buildah
  when: manual
  rules:
    - when: manual
    - allow_failure: true

################# BUILD CONTAINERS #######################

build-containers:build-debian:
  stage: build-containers
  image: $BUILD_CONTAINERS_IMAGE
  script:
    - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-minimal build-debian-minimal
    - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian build-debian

build-containers:build-debian-armhf:
  stage: build-containers
  image: $BUILD_CONTAINERS_IMAGE
  script:
    - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-armhf build-debian-armhf

build-containers:build-debian-arm64:
  stage: build-containers
  image: $BUILD_CONTAINERS_IMAGE
  script:
    - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-arm64 build-debian-arm64

build-containers:build-fedora:
  stage: build-containers
  image: $BUILD_CONTAINERS_IMAGE
  script:
    - .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-fedora build-fedora

#################### BUILD #########################

build:tests-fedora:
  stage: build
  script:
    - meson setup --prefix=/opt/igt $MESON_OPTIONS build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc
    - DESTDIR="$PWD/installdir" ninja -C build install
  artifacts:
    paths:
      - build
      - installdir

build:tests-fedora-no-libunwind:
  stage: build
  script:
    - dnf remove -y libunwind-devel
    - meson setup -Dlibunwind=disabled build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1

# documentation building is different with meson<0.47
build:tests-fedora-oldest-meson:
  stage: build
  script:
    - dnf remove -y meson
    - pip install /usr/src/meson-*.tar.gz
    - meson setup $MESON_OPTIONS build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc

# ensure igt_nouveau stubs build when nouveau support for libdrm is disabled
build:tests-fedora-no-libdrm-nouveau:
  stage: build
  script:
    - meson setup -Dlibdrm_drivers= build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1

build:tests-fedora-clang:
  stage: build
  variables:
    CC: clang
  script:
    - meson setup $MESON_OPTIONS build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
  artifacts:
    paths:
      - build

build:tests-debian-meson:
  image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian:commit-$CI_COMMIT_SHA
  stage: build
  script:
    - meson setup $MESON_OPTIONS build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
    - cp build/tests/test-list.txt meson-test-list.txt
  artifacts:
    paths:
      - meson-test-list.txt

build:tests-debian-minimal:
  image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA
  stage: build
  script:
    - meson setup -Dtests=disabled -Dlibdrm_drivers="" build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
  artifacts:
    paths:
      - build

build:tests-debian-meson-armhf:
  image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-armhf:commit-$CI_COMMIT_SHA
  stage: build
  script:
    - export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/
    - meson setup --cross-file meson-cross-armhf.txt build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
  artifacts:
    paths:
      - build

build:tests-debian-meson-arm64:
  image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-arm64:commit-$CI_COMMIT_SHA
  stage: build
  script:
    - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
    - meson setup --cross-file meson-cross-arm64.txt build
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
  artifacts:
    paths:
      - build

#################### TEST ##########################

test:ninja-test:
  retry: 2
  dependencies:
    - build:tests-fedora
  stage: test
  script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}

test:ninja-test-clang:
  retry: 2
  dependencies:
    - build:tests-fedora-clang
  variables:
    CC: clang
  stage: test
  script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}

test:ninja-test-minimal:
  retry: 2
  image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA
  dependencies:
    - build:tests-debian-minimal
  stage: test
  script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}

# arm testing temporarily disabled until converted to run on native arm HW
# test:ninja-test-arm64:
#   retry: 2
#   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-arm64:commit-$CI_COMMIT_SHA
#   dependencies:
#     - build:tests-debian-meson-arm64
#   stage: test
#   script:
#     - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
#     - env > build/envdump.txt
#     - meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}
#   artifacts:
#     paths:
#       - build
#     when: on_failure
#
# test:ninja-test-armhf:
#   retry: 2
#   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-armhf:commit-$CI_COMMIT_SHA
#   dependencies:
#     - build:tests-debian-meson-armhf
#   stage: test
#   script:
#     - export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/
#     - env > build/envdump.txt
#     - meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}
#   artifacts:
#     paths:
#       - build
#     when: on_failure

test:list-undocumented-tests:
  dependencies:
    - build:tests-fedora
  stage: test
  script: .gitlab-ci/list_undocumented_tests.py build/tests/test-list.txt > undocumented_tests.txt
  artifacts:
    paths:
      - undocumented_tests.txt

test:verify-blocklists:
  dependencies:
    - build:tests-fedora
  stage: test
  script: for bl in tests/intel-ci/i915.blocklist{,-pre-merge}.txt; do scripts/verify-blocklist.sh build/runner/igt_runner build/tests "$bl" || exit 1; done

################### DEPLOY #########################

pages:
  when: manual
  dependencies:
    - build:tests-fedora
  stage: deploy
  script:
    - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc
    - cp -r build/docs/reference/igt-gpu-tools/html public
  artifacts:
    paths:
      - public
  only:
    - master

############## CONTAINERS ####################

containers:igt:
  stage: containers
  image: $BUILD_CONTAINERS_IMAGE
  dependencies:
    - build:tests-fedora
  variables:
    FORCE_REBUILD: 1
  script:
    - .gitlab-ci/pull-or-rebuild.sh igt Dockerfile igt