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
|
# This is the tag of the docker image used for the build jobs. If the
# image doesn't exist yet, the containers stage generates it.
#
# In order to generate a new image, one should generally change the tag.
# While removing the image from the registry would also work, that's not
# recommended except for ephemeral images during development: Replacing
# an image after a significant amount of time might pull in newer
# versions of gcc/clang or other packages, which might break the build
# with older commits using the same tag.
#
# After merging a change resulting in generating a new image to the
# main repository, it's recommended to remove the image from the source
# repository's container registry, so that the image from the main
# repository's registry will be used there as well.
variables:
UPSTREAM_REPO: mesa/piglit
DEBIAN_TAG: "2021-02-09_4"
DEBIAN_VERSION: buster-slim
DEBIAN_IMAGE: "$CI_REGISTRY_IMAGE/debian/$DEBIAN_VERSION:$DEBIAN_TAG"
WINDOWS_TAG: "2020-08-18"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/windows/x64_build:$WINDOWS_TAG"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$UPSTREAM_REPO/windows/x64_build:$WINDOWS_TAG"
GIT_DEPTH: 100
include:
- project: 'wayland/ci-templates'
ref: b7030c2cd0d6ccc5f6d4f8299bafa4daa9240d71
file: '/templates/debian.yml'
stages:
- container
- build
- deploy
# When & how to run the CI
.ci-run-policy:
retry:
max: 2
when:
- runner_system_failure
# Cancel CI run if a newer commit is pushed to the same branch
interruptible: true
# CONTAINERS
debian:
stage: container
extends:
- .ci-run-policy
- .debian@container-ifnot-exists
variables:
GIT_STRATEGY: none # no need to pull the whole tree for rebuilding the image
DEBIAN_EXEC: 'bash .gitlab-ci/debian-install.sh'
.use-debian:
extends:
- .ci-run-policy
needs: [debian]
image: $DEBIAN_IMAGE
windows:
stage: container
extends:
- .ci-run-policy
variables:
GIT_STRATEGY: fetch # we do actually need the full repository though
timeout: 3h
tags:
- windows
- shell
- "1809"
script:
- .\.gitlab-ci\windows\container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE
.use-windows:
extends:
- .ci-run-policy
tags:
- windows
- docker
- "1809"
needs: [windows]
image: $WINDOWS_IMAGE
# BUILD
# Use ccache transparently, and print stats before/after
.use-ccache:
variables:
CC: /usr/lib/ccache/gcc
CXX: /usr/lib/ccache/g++
CCACHE_COMPILERCHECK: content
CCACHE_DIR: /cache/piglit/ccache
before_script:
- export CCACHE_BASEDIR="$PWD"
- ccache --show-stats
after_script:
- ccache --show-stats
build-debian:
stage: build
extends:
- .use-debian
- .use-ccache
script:
- cmake .
-D CMAKE_BUILD_TYPE=Debug
-D PIGLIT_BUILD_CL_TESTS=on
-D PIGLIT_BUILD_DMA_BUF_TESTS=on
-D PIGLIT_BUILD_GLES1_TESTS=on
-D PIGLIT_BUILD_GLES2_TESTS=on
-D PIGLIT_BUILD_GLX_TESTS=on
-D PIGLIT_BUILD_GL_TESTS=on
-D PIGLIT_BUILD_WGL_TESTS=off
-GNinja
- ninja -j4
build-debian-mingw:
stage: build
extends:
- .use-debian
- .use-ccache
parallel:
matrix:
- TARGET: [mingw32, mingw64]
script:
- .gitlab-ci/build-mingw.sh ${TARGET}
artifacts:
paths:
- build/*/piglit-*.7z
build-windows:
stage: build
extends:
- .use-windows
script:
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64 &&
cmake . -D CMAKE_BUILD_TYPE=Debug
-D PIGLIT_BUILD_CL_TESTS=off
-D GLUT_INCLUDE_DIR=C:\freeglut\include
-D GLUT_glut_LIBRARY_RELEASE=C:\freeglut\lib\x64\freeglut.lib
-D GLEXT_INCLUDE_DIR=C:\glext\
-D PIGLIT_BUILD_DMA_BUF_TESTS=off
-D PIGLIT_BUILD_GLES1_TESTS=off
-D PIGLIT_BUILD_GLES2_TESTS=off
-D PIGLIT_BUILD_GLX_TESTS=off
-D PIGLIT_BUILD_GL_TESTS=on
-D PIGLIT_BUILD_WGL_TESTS=on
-GNinja &&
ninja -j4"
py.test:
stage: build
extends:
- .use-debian
script:
- pytest-3 unittests/framework
tox:
image: python:${PY_MAJVER}.${PY_MINVER}
stage: build
extends:
- .ci-run-policy
before_script:
- pip install tox
script:
- tox -e "py${PY_MAJVER}${PY_MINVER}-{generator,noaccel,accel-nix,streams,functional}"
parallel:
matrix:
- PY_MAJVER: 3
PY_MINVER: [6, 7, 8]
needs: []
pages:
stage: deploy
image: alpine
script:
- apk --no-cache add py2-pip python-dev
- pip install sphinx
- pip install Flask-Sphinx-Themes
- cd docs
- ./build-html.sh
- mv _build/html/ ../public/
artifacts:
paths:
- public
only:
refs:
- main
changes:
- docs/**
|