• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora:latest
2variables:
3  MESON_OPTIONS: >
4    -Dlibdrm_drivers=intel,nouveau,amdgpu
5    -Doverlay=enabled
6    -Dchamelium=enabled
7    -Dvalgrind=enabled
8    -Dman=enabled
9    -Dtests=enabled
10    -Drunner=enabled
11    -Dlibunwind=enabled
12  LANG: "C.UTF-8"
13
14stages:
15  - containers
16  - build
17  - test
18  - deploy
19
20#################### BUILD #########################
21
22build:tests-fedora:
23  stage: build
24  script:
25    - meson $MESON_OPTIONS build
26    - ninja -C build
27    - ninja -C build igt-gpu-tools-doc
28  artifacts:
29    paths:
30      - build
31
32build:tests-fedora-no-libunwind:
33  stage: build
34  script:
35    - dnf remove -y libunwind-devel
36    - meson -Dlibunwind=disabled build
37    - ninja -C build
38
39# documentation building is different with meson<0.47
40build:tests-fedora-oldest-meson:
41  stage: build
42  script:
43    - dnf remove -y meson
44    - pip3 install /usr/src/meson-*.tar.gz
45    - meson $MESON_OPTIONS build
46    - ninja -C build
47    - ninja -C build igt-gpu-tools-doc
48
49build:tests-fedora-clang:
50  stage: build
51  variables:
52    CC: clang
53  script:
54    - meson $MESON_OPTIONS build
55    - ninja -C build
56  artifacts:
57    paths:
58      - build
59
60build:tests-debian-meson:
61  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
62  stage: build
63  script:
64    - meson $MESON_OPTIONS build
65    - ninja -C build
66    - cp build/tests/test-list.txt meson-test-list.txt
67  artifacts:
68    paths:
69      - meson-test-list.txt
70
71build:tests-debian-minimal:
72  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-minimal:latest
73  stage: build
74  script:
75    - meson -Dtests=disabled -Dlibdrm_drivers="" build
76    - ninja -C build
77  artifacts:
78    paths:
79      - build
80
81build:tests-debian-meson-armhf:
82  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-armhf:latest
83  stage: build
84  script:
85    - export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/
86    - meson --cross-file meson-cross-armhf.txt build
87    - ninja -C build
88  artifacts:
89    paths:
90      - build
91
92build:tests-debian-meson-arm64:
93  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64:latest
94  stage: build
95  script:
96    - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
97    - meson --cross-file meson-cross-arm64.txt build
98    - ninja -C build
99  artifacts:
100    paths:
101      - build
102
103build:tests-debian-meson-mips:
104  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-mips:latest
105  stage: build
106  script:
107    - export PKG_CONFIG_PATH=/usr/lib/mips-linux-gnu/pkgconfig/
108    - meson --cross-file meson-cross-mips.txt build
109    - ninja -C build
110  artifacts:
111    paths:
112      - build
113
114build:tests-debian-autotools:
115  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
116  stage: build
117  script:
118    - ./autogen.sh --enable-{chamelium,audio,intel,amdgpu,nouveau,tests,runner}
119    - make -j
120    - cp tests/test-list.txt autotools-test-list.txt
121  artifacts:
122    paths:
123      - autotools-test-list.txt
124
125#################### TEST ##########################
126
127test:ninja-test:
128  dependencies:
129    - build:tests-fedora
130  stage: test
131  script: ninja -C build test
132
133test:ninja-test-clang:
134  dependencies:
135    - build:tests-fedora-clang
136  variables:
137    CC: clang
138  stage: test
139  script: ninja -C build test
140
141test:ninja-test-minimal:
142  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-minimal:latest
143  dependencies:
144    - build:tests-debian-minimal
145  stage: test
146  script: ninja -C build test
147
148test:ninja-test-arm64:
149  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64:latest
150  dependencies:
151    - build:tests-debian-meson-arm64
152  stage: test
153  script:
154    - export PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig/
155    - env > build/envdump.txt
156    - ninja -C build test
157  artifacts:
158    paths:
159      - build
160    when: on_failure
161
162test:ninja-test-armhf:
163  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-armhf:latest
164  dependencies:
165    - build:tests-debian-meson-armhf
166  stage: test
167  script:
168    - export PKG_CONFIG_PATH=/usr/lib/arm-linux-gnueabihf/pkgconfig/
169    - env > build/envdump.txt
170    - ninja -C build test
171  artifacts:
172    paths:
173      - build
174    when: on_failure
175
176test:ninja-test-mips:
177  image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-mips:latest
178  dependencies:
179    - build:tests-debian-meson-mips
180  stage: test
181  script:
182    - export PKG_CONFIG_PATH=/usr/lib/mips-linux-gnu/pkgconfig/
183    - env > build/envdump.txt
184    - ninja -C build test
185  artifacts:
186    paths:
187      - build
188    when: on_failure
189
190test:test-list-diff:
191  dependencies:
192    - build:tests-debian-autotools
193    - build:tests-debian-meson
194  stage: test
195  script: diff <(sed "s/ /\n/g" meson-test-list.txt| grep -v 'vc4\|v3d\|panfrost' | sort) <(sed "s/ /\n/g" autotools-test-list.txt | sort)
196
197################### DEPLOY #########################
198
199pages:
200  when: manual
201  dependencies:
202    - build:tests-fedora
203  stage: deploy
204  script:
205    - ninja -C build igt-gpu-tools-doc
206    - cp -r build/docs/reference/igt-gpu-tools/html public
207  artifacts:
208    paths:
209      - public
210  only:
211    - master
212
213################# CONTAINERS #######################
214
215containers:igt-debian:
216  stage: containers
217  image: docker:stable
218  only:
219    changes:
220      - Dockerfile.debian-minimal
221      - Dockerfile.debian
222      - .gitlab-ci.yml
223  services:
224    - docker:dind
225  variables:
226    DOCKER_HOST: tcp://docker:2375
227    DOCKER_DRIVER: overlay2
228  script:
229    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
230    - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-minimal -t igt-debian-minimal -f Dockerfile.debian-minimal .
231    - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian -f Dockerfile.debian .
232    - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-minimal
233    - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian
234
235containers:igt-debian-armhf:
236  stage: containers
237  image: docker:stable
238  only:
239    changes:
240      - Dockerfile.debian-armhf
241      - .gitlab-ci.yml
242  services:
243    - docker:dind
244  variables:
245    DOCKER_HOST: tcp://docker:2375
246    DOCKER_DRIVER: overlay2
247  script:
248    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
249    - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-armhf -f Dockerfile.debian-armhf .
250    - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-armhf
251
252containers:igt-debian-arm64:
253  stage: containers
254  image: docker:stable
255  only:
256    changes:
257      - Dockerfile.debian-arm64
258      - .gitlab-ci.yml
259  services:
260    - docker:dind
261  variables:
262    DOCKER_HOST: tcp://docker:2375
263    DOCKER_DRIVER: overlay2
264  script:
265    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
266    - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64 -f Dockerfile.debian-arm64 .
267    - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-arm64
268
269containers:igt-debian-mips:
270  stage: containers
271  image: docker:stable
272  only:
273    changes:
274      - Dockerfile.debian-mips
275      - .gitlab-ci.yml
276  services:
277    - docker:dind
278  variables:
279    DOCKER_HOST: tcp://docker:2375
280    DOCKER_DRIVER: overlay2
281  script:
282    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
283    - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-mips -f Dockerfile.debian-mips .
284    - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian-mips
285
286containers:igt-fedora:
287  stage: containers
288  image: docker:stable
289  only:
290    changes:
291      - Dockerfile.fedora
292      - .gitlab-ci.yml
293  services:
294    - docker:dind
295  variables:
296    DOCKER_HOST: tcp://docker:2375
297    DOCKER_DRIVER: overlay2
298  script:
299    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
300    - docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora -f Dockerfile.fedora .
301    - docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora
302