1 # vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
3 # This CI uses the freedesktop.org ci-templates.
4 # Please see the ci-templates documentation for details:
5 # https://freedesktop.pages.freedesktop.org/ci-templates/
7 .templates_sha: &template_sha c5626190ec14b475271288dda7a7dae8dbe0cd76 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
9 # FDO_DISTRIBUTION_TAG is the tag of the docker image used for the build jobs.
10 # If the image doesn't exist yet, the docker-image stage generates it.
12 # In order to generate a new image, one should generally change the tag.
13 # While removing the image from the registry would also work, that's not
14 # recommended except for ephemeral images during development: Replacing an
15 # image after a significant amount of time might pull in newer versions of
16 # gcc/clang or other packages, which might break the build with older commits
19 FDO_UPSTREAM_REPO: xorg/xserver
20 FDO_DISTRIBUTION_VERSION: bullseye-slim
21 FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
22 FDO_DISTRIBUTION_TAG: "2024-03-26-explicit-sync-2"
23 MESON_BUILDDIR: "build"
26 - project: 'freedesktop/ci-templates'
28 file: '/templates/debian.yml'
29 - project: 'freedesktop/ci-templates'
31 file: '/templates/ci-fairy.yml'
32 - template: Security/SAST.gitlab-ci.yml
41 # Retry jobs after runner system failures
45 - runner_system_failure
46 # Cancel CI run if a newer commit is pushed to the same branch
49 # This is everything but the DDXen
50 .dix_paths: &dix_paths
88 .xorg_paths: &xorg_paths
91 .xwayland_paths: &xwayland_paths
99 - .fdo.container-build@debian
105 .common-build-and-test:
107 - .fdo.distribution-image@debian
109 stage: build-and-test
113 - $MESON_BUILDDIR/meson-logs/
114 - $MESON_BUILDDIR/test/piglit-results/
116 MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true
117 CCACHE_COMPILERCHECK: content
118 CCACHE_DIR: /cache/xserver/cache
121 - export CCACHE_BASEDIR="$PWD"
122 - export PATH="/usr/lib/ccache:$PATH"
123 - ccache --show-stats
125 - ccache --show-stats
128 extends: .common-build-and-test
130 - .gitlab-ci/meson-build.sh --run-test
131 - .gitlab-ci/check-piglit-results.sh
132 - .gitlab-ci/manpages-check
135 PIGLIT_DIR: /root/piglit
151 extends: .common-build-and-test
153 - .gitlab-ci/meson-build.sh --run-install
155 MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true
158 extends: .common-build-and-test
162 - $MESON_BUILDDIR/meson-logs/
163 - $MESON_BUILDDIR/xserver-*/$MESON_BUILDDIR/meson-logs/
165 - .gitlab-ci/meson-build.sh --run-dist
166 - mkdir xserver-tarball
167 - tar xf $MESON_BUILDDIR/meson-dist/xserver-*.tar.xz -C xserver-tarball --strip-components=1
168 - .gitlab-ci/meson-build.sh -C xserver-tarball --skip-test --skip-dist --run-install
170 MESON_DIST_ARGS: --no-tests
171 DESTDIR: xserver-tarball/install/
173 xf86-driver-build-test:
175 - .fdo.distribution-image@debian
180 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev
181 SHA: xf86-input-evdev-2.10.6
182 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput
183 SHA: xf86-input-libinput-1.4.0
184 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse
185 SHA: xf86-input-mouse-1.9.5
186 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics
187 SHA: xf86-input-synaptics-1.9.2
188 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
189 SHA: xf86-video-amdgpu-23.0.0
190 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati
191 SHA: xf86-video-ati-22.0.0
192 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl
193 SHA: xf86-video-qxl-0.1.6
194 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa
195 SHA: xf86-video-vesa-2.6.0
196 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware
197 SHA: xf86-video-vmware-13.4.0
199 # Install the server first
200 - .gitlab-ci/meson-build.sh --skip-test --run-install
201 - unset MESON_EXTRA_ARGS
202 - DRIVER=$(basename $REPO)
203 - git clone "$REPO" "$DRIVER"
204 - GIT_DIR="$DRIVER/.git" git checkout -f "$SHA"
206 if [[ -e "$DRIVER/meson.build" ]]; then
207 .gitlab-ci/meson-build.sh -C "$DRIVER" --skip-test
209 pushd "$DRIVER" || exit 1
216 MESON_ARGS: -Dprefix=/usr/
217 MESON_EXTRA_ARGS: -Dxwayland=false -Dxnest=false -Dxvfb=false -Dxquartz=false -Ddocs=false
219 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
222 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
227 # Verify that commit messages are as expected
235 - ci-fairy check-commits --junit-xml=results.xml
237 - master@xorg/xserver
246 # Verify that the merge request has the allow-collaboration checkbox ticked
254 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
256 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
264 # Workflow rules needed due to:
265 # https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
269 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
270 - if: $CI_OPEN_MERGE_REQUESTS
272 - if: $CI_PIPELINE_SOURCE == 'push'