blob: bd1ddb79b119856ff304c6b777ffce4827d3aebc (
plain)
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
|
image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora:latest
variables:
MESON_OPTIONS: >
-Dwith_libdrm=intel,nouveau,amdgpu
-Dbuild_overlay=true
-Dbuild_audio=true
-Dbuild_chamelium=true
-Dwith_valgrind=true
-Dbuild_man=true
-Dbuild_tests=true
-Dbuild_runner=true
stages:
- containers
- build
- test
- deploy
#################### BUILD #########################
build:tests-fedora:
stage: build
script:
- meson $MESON_OPTIONS build
- ninja -C build
artifacts:
paths:
- build
# documentation building is different with meson<0.47
build:tests-fedora-oldest-meson:
stage: build
script:
- dnf remove -y meson
- pip3 install /usr/src/meson-*.tar.gz
- meson $MESON_OPTIONS build
- ninja -C build
- ninja -C build igt-gpu-tools-doc
build:tests-debian-meson:
image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
stage: build
script:
- meson $MESON_OPTIONS build
- ninja -C build
- cp build/tests/test-list.txt meson-test-list.txt
artifacts:
paths:
- meson-test-list.txt
build:tests-debian-autotools:
image: $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian:latest
stage: build
script:
- ./autogen.sh --enable-{chamelium,audio,intel,amdgpu,nouveau,tests,runner}
- make -j
- cp tests/test-list.txt autotools-test-list.txt
artifacts:
paths:
- autotools-test-list.txt
#################### TEST ##########################
test:ninja-test:
dependencies:
- build:tests-fedora
stage: test
script: ninja -C build test
test:test-list-diff:
dependencies:
- build:tests-debian-autotools
- build:tests-debian-meson
stage: test
script: diff <(sed "s/ /\n/g" meson-test-list.txt| sort) <(sed "s/ /\n/g" autotools-test-list.txt | sort)
################### DEPLOY #########################
pages:
dependencies:
- build:tests-fedora
stage: deploy
script:
- ninja -C build igt-gpu-tools-doc
- cp -r build/docs/reference/igt-gpu-tools/html public
artifacts:
paths:
- public
only:
- master
################# CONTAINERS #######################
containers:igt-debian:
stage: containers
when: manual
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian -f Dockerfile.debian .
- docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-debian
containers:igt-fedora:
stage: containers
when: manual
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora -f Dockerfile.fedora .
- docker push $CI_REGISTRY/$CI_PROJECT_PATH/igt-fedora
|