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 MESON_BUILDDIR: 'build'
21 REPO_URL_XORGPROTO: 'https://gitlab.freedesktop.org/xorg/proto/xorgproto.git'
22 XORG_DEBIAN_VERSION: 'bullseye-slim'
23 XORG_DEBIAN_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
24 XORG_DEBIAN_TAG: '2024-11-14-wayland-protocols-1-38'
25 XORG_FREEBSD_VERSION: '14.0'
27 XORG_FREEBSD_TAG: '2024-06-10.0'
30 - project: 'freedesktop/ci-templates'
33 - '/templates/debian.yml'
34 - '/templates/freebsd.yml'
35 - '/templates/ci-fairy.yml'
36 - template: Security/SAST.gitlab-ci.yml
45 # Retry jobs after runner system failures
49 - runner_system_failure
50 # Cancel CI run if a newer commit is pushed to the same branch
53 # This is everything but the DDXen
54 .dix_paths: &dix_paths
92 .xorg_paths: &xorg_paths
95 .xwayland_paths: &xwayland_paths
103 FDO_DISTRIBUTION_VERSION: '$XORG_DEBIAN_VERSION'
104 FDO_DISTRIBUTION_EXEC: '$XORG_DEBIAN_EXEC'
105 FDO_DISTRIBUTION_TAG: '$XORG_DEBIAN_TAG'
109 FDO_DISTRIBUTION_TAG: '$XORG_FREEBSD_TAG'
110 FDO_DISTRIBUTION_VERSION: '$XORG_FREEBSD_VERSION'
111 FDO_DISTRIBUTION_EXEC: ''
112 FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake libtool xorg-macros xorgproto bash meson ninja pixman xtrans libXau libXdmcp libXfont2 libxkbfile libxcvt libpciaccess font-util libepoll-shim'
116 - .fdo.container-build@debian
125 - .fdo.qemu-build@freebsd@x86_64
133 - .fdo.distribution-image@debian
138 - .fdo.distribution-image@freebsd
142 PKG_CONFIG_PATH: /usr/share/pkgconfig:/usr/lib/pkgconfig:/usr/pkg/share/pkgconfig:/usr/pkg/lib/pkgconfig:/usr/local/libdata/pkgconfig
144 .common-build-and-test:
148 stage: build-and-test
152 - $MESON_BUILDDIR/meson-logs/
153 - $MESON_BUILDDIR/test/piglit-results/
155 MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true -Dxcsecurity=true
156 CCACHE_COMPILERCHECK: content
157 CCACHE_DIR: /cache/xserver/cache
160 - export CCACHE_BASEDIR="$PWD"
161 - export PATH="/usr/lib/ccache:$PATH"
162 - ccache --show-stats
164 - ccache --show-stats
167 extends: .common-build-and-test
169 - .gitlab-ci/meson-build.sh --run-test
170 - .gitlab-ci/check-piglit-results.sh
171 - .gitlab-ci/manpages-check
172 - .gitlab-ci/check-ddx-build.sh
175 PIGLIT_DIR: /root/piglit
177 MESON_DDX_BUILD_ARGS: >
178 -Dxwayland=${BUILD_XWAYLAND} -Dxorg=${BUILD_XORG} -Dxephyr=${BUILD_XEPHYR} -Dxvfb=${BUILD_XVFB} -Dxnest=${BUILD_XNEST}
184 MESON_EXTRA_ARGS: ${MESON_DDX_BUILD_ARGS}
189 MESON_EXTRA_ARGS: -Dglamor=false ${MESON_DDX_BUILD_ARGS}
198 MESON_EXTRA_ARGS: -Dlibdecor=false ${MESON_DDX_BUILD_ARGS}
201 extends: .common-build-and-test
203 - .gitlab-ci/meson-build.sh --run-install
205 MESON_ARGS: --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dlisten_tcp=true
208 stage: build-and-test
210 - .xorg-image@freebsd
212 MESON_ARGS: -Dglx=false -Dglamor=false -Dudev=false -Dudev_kms=false
214 # running of of disk space without this
215 # needed until https://gitlab.freedesktop.org/freedesktop/ci-templates/-/issues/67 is fixed
217 - git clone --depth=1 $REPO_URL_XORGPROTO dep.xorgproto
221 # need to install newer xorgproto
222 - /app/vmctl exec "cd $CI_PROJECT_NAME/dep.xorgproto && ./autogen.sh --prefix=/usr && make && make install"
223 - /app/vmctl exec "cd $CI_PROJECT_NAME && PKG_CONFIG_PATH=\"$PKG_CONFIG_PATH\" MESON_ARGS=\"$MESON_ARGS\" MESON_BUILDDIR=\"$MESON_BUILDDIR\" .gitlab-ci/meson-build.sh --skip-test" && touch .success
224 # test not working yet, so skipped
225 # - scp -r vm:$CI_PROJECT_NAME/test-results.xml .
228 - test -e .success || exit 1
231 extends: .common-build-and-test
235 - $MESON_BUILDDIR/meson-logs/
236 - $MESON_BUILDDIR/xserver-*/$MESON_BUILDDIR/meson-logs/
238 - .gitlab-ci/meson-build.sh --run-dist
239 - mkdir xserver-tarball
240 - tar xf $MESON_BUILDDIR/meson-dist/xserver-*.tar.xz -C xserver-tarball --strip-components=1
241 - .gitlab-ci/meson-build.sh -C xserver-tarball --skip-test --skip-dist --run-install
243 MESON_DIST_ARGS: --no-tests
244 DESTDIR: xserver-tarball/install/
246 xf86-driver-build-test:
253 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-evdev
254 SHA: xf86-input-evdev-2.10.6
255 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-libinput
256 SHA: xf86-input-libinput-1.4.0
257 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-mouse
258 SHA: xf86-input-mouse-1.9.5
259 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-input-synaptics
260 SHA: xf86-input-synaptics-1.9.2
261 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu
262 SHA: xf86-video-amdgpu-23.0.0
263 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati
264 SHA: xf86-video-ati-22.0.0
265 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-qxl
267 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vesa
268 SHA: xf86-video-vesa-2.6.0
269 - REPO: https://gitlab.freedesktop.org/xorg/driver/xf86-video-vmware
270 SHA: xf86-video-vmware-13.4.0
272 # Install the server first
273 - .gitlab-ci/meson-build.sh --skip-test --run-install
274 - unset MESON_EXTRA_ARGS
275 - DRIVER=$(basename $REPO)
276 - git clone "$REPO" "$DRIVER"
277 - git -C "$DRIVER" checkout "$SHA"
279 if [[ -e "$DRIVER/meson.build" ]]; then
280 .gitlab-ci/meson-build.sh -C "$DRIVER" --skip-test
282 pushd "$DRIVER" || exit 1
289 MESON_ARGS: -Dprefix=/usr/
290 MESON_EXTRA_ARGS: -Dxwayland=false -Dxnest=false -Dxvfb=false -Dxquartz=false -Ddocs=false
292 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
295 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
300 # Verify that commit messages are as expected
308 - ci-fairy check-commits --junit-xml=results.xml
310 - master@xorg/xserver
319 # Verify that the merge request has the allow-collaboration checkbox ticked
327 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
329 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
337 # Workflow rules needed due to:
338 # https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
342 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
343 - if: $CI_OPEN_MERGE_REQUESTS
345 - if: $CI_PIPELINE_SOURCE == 'push'