Debian Codegraph @

.gitlab-ci.yml

raw symbols SCIP
1 # vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
2 #
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/
6
7 .templates_sha: &template_sha c5626190ec14b475271288dda7a7dae8dbe0cd76 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
8
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.
11 #
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
17 # using the same tag.
18 variables:
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-09-24-no-xorg"
23 MESON_BUILDDIR: "build"
24
25 include:
26 - project: 'freedesktop/ci-templates'
27 ref: *template_sha
28 file: '/templates/debian.yml'
29 - project: 'freedesktop/ci-templates'
30 ref: *template_sha
31 file: '/templates/ci-fairy.yml'
32 - template: Security/SAST.gitlab-ci.yml
33
34 stages:
35 - docker-image
36 - build-and-test
37 - test
38
39 .ci-run-policy:
40 # Retry jobs after runner system failures
41 retry:
42 max: 2
43 when:
44 - runner_system_failure
45 # Cancel CI run if a newer commit is pushed to the same branch
46 interruptible: true
47
48 debian-bullseye:
49 extends:
50 - .fdo.container-build@debian
51 - .ci-run-policy
52 stage: docker-image
53 variables:
54 GIT_STRATEGY: none
55
56 .common-build-and-test:
57 extends:
58 - .fdo.distribution-image@debian
59 - .ci-run-policy
60 stage: build-and-test
61 artifacts:
62 when: always
63 paths:
64 - $MESON_BUILDDIR/meson-logs/
65 - $MESON_BUILDDIR/test/piglit-results/
66 variables:
67 MESON_ARGS: -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true
68 CCACHE_COMPILERCHECK: content
69 CCACHE_DIR: /cache/xserver/cache
70 LC_ALL: C.UTF-8
71 before_script:
72 - export CCACHE_BASEDIR="$PWD"
73 - export PATH="/usr/lib/ccache:$PATH"
74 - ccache --show-stats
75 after_script:
76 - ccache --show-stats
77
78 meson:
79 extends: .common-build-and-test
80 script:
81 - .gitlab-ci/meson-build.sh --run-test
82 - .gitlab-ci/check-piglit-results.sh
83 - .gitlab-ci/manpages-check
84 variables:
85 XTEST_DIR: /root/xts
86 PIGLIT_DIR: /root/piglit
87 LP_NUM_THREADS: 0
88
89 meson-noglamor:
90 extends: meson
91 variables:
92 MESON_EXTRA_ARGS: >
93 -Dglamor=false
94
95 meson-nolibdecor:
96 extends: meson
97 variables:
98 MESON_EXTRA_ARGS: >
99 -Dlibdecor=false
100
101 meson-dist:
102 extends: .common-build-and-test
103 artifacts:
104 when: always
105 paths:
106 - $MESON_BUILDDIR/meson-logs/
107 - $MESON_BUILDDIR/xwayland-*/$MESON_BUILDDIR/meson-logs/
108 script:
109 - .gitlab-ci/meson-build.sh --run-dist
110 - mkdir xwayland-tarball
111 - tar xf $MESON_BUILDDIR/meson-dist/xwayland-*.tar.xz -C xwayland-tarball --strip-components=1
112 - .gitlab-ci/meson-build.sh -C xwayland-tarball --skip-test --skip-dist --run-install
113 variables:
114 MESON_DIST_ARGS: --no-tests
115 DESTDIR: xwayland-tarball/install/
116
117 #
118 # Verify that commit messages are as expected
119 #
120 check-commits:
121 extends:
122 - .fdo.ci-fairy
123 needs: []
124 stage: test
125 script:
126 - ci-fairy check-commits --junit-xml=results.xml
127 except:
128 - master@xorg/xserver
129 variables:
130 GIT_DEPTH: 100
131 artifacts:
132 reports:
133 junit: results.xml
134 allow_failure: true
135
136 #
137 # Verify that the merge request has the allow-collaboration checkbox ticked
138 #
139 check-merge-request:
140 extends:
141 - .fdo.ci-fairy
142 needs: []
143 stage: test
144 rules:
145 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
146 script:
147 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
148 artifacts:
149 when: on_failure
150 reports:
151 junit: results.xml
152 allow_failure: true
153
154 #
155 # Workflow rules needed due to:
156 # https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/438
157 #
158 workflow:
159 rules:
160 - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
161 - if: $CI_OPEN_MERGE_REQUESTS
162 when: never
163 - if: $CI_PIPELINE_SOURCE == 'push'