Debian Codegraph @

.gitlab-ci/ci.template

raw
1 ## This file is generated. Do not modify
2
3 include:
4 - '/.gitlab-ci/tags.yml'
5 - project: "Infrastructure/freedesktop-ci-templates"
6 file: "templates/fedora.yml"
7 ref: "e195d80f35b45cc73668be3767b923fd76c70ed5"
8 - project: "Infrastructure/freedesktop-ci-templates"
9 file: "templates/ci-fairy.yml"
10 ref: "e195d80f35b45cc73668be3767b923fd76c70ed5"
11 - component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
12 inputs:
13 dist-job-name: build-{{targets["dist"]}}
14 # gupnp tags are always of the format {PROJECT_NAME}-{version}
15 tarball-artifact-path: "build/meson-dist/${CI_COMMIT_TAG}.tar.xz"
16 - project: "GNOME/citemplates"
17 file: "templates/default-rules.yml"
18
19
20 variables:
21 MESON_TEST_TIMEOUT_MULTIPLIER: 3
22
23 stages:
24 - review
25 - prepare
26 - build
27 - test
28 - website
29 - analysis
30 - deploy
31
32 .check-template: &check
33 extends:
34 - .fdo.ci-fairy
35 artifacts:
36 expire_in: 1 week
37 paths:
38 - check-junit-report.xml
39 reports:
40 junit: check-junit-report.xml
41
42 check-commit-log:
43 variables:
44 GIT_DEPTH: "100"
45 stage: review
46 script:
47 - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
48 then
49 ci-fairy check-commits --junit-xml=check-junit-report.xml ;
50 else
51 echo "Not a merge request" ;
52 fi
53 <<: *check
54
55 check-merge-request:
56 variables:
57 GIT_STRATEGY: none
58 stage: review
59 script:
60 - if [[ x"$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" != "x" ]] ;
61 then
62 ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-junit-report.xml ;
63 else
64 echo "Not a merge request" ;
65 fi
66 <<: *check
67
68 .build-template: &build
69 stage: build
70 script:
71 - meson . build --prefix=/usr -Db_coverage=true -Dgtk_doc=true
72 - ninja -C build
73 - meson dist -C build --no-tests
74 artifacts:
75 expire_in: 1 day
76 paths:
77 - build
78
79 .test-template: &test
80 stage: test
81 variables:
82 G_SLICE: "always-malloc"
83 MALLOC_CHECK_: "3"
84 script:
85 - cd build
86 - |
87 # Remove the many "CI_" variables from the environment. Meson dumps the
88 # whole environment for every failed test, and that gives a whole
89 # screenful of junk each time unless we strip these.
90 unset $(env|grep -o '^CI_[^=]*')
91 env LANG=C.UTF-8 LC_ALL=C.UTF-8 meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --print-errorlogs ${MESON_TEST_EXTRA_ARGS} --suite {{project}}
92 after_script:
93 - |
94 echo "Distribution: "
95 echo
96 egrep '^NAME=|^VERSION=' /etc/os-release
97 echo
98 echo "Test suite settings:"
99 echo
100 echo "G_MESSAGES_DEBUG: ${G_MESSAGES_DEBUG}"
101 echo "MESON_TEST_EXTRA_ARGS: ${MESON_TEST_EXTRA_ARGS}"
102 echo
103 echo "These values can be set at https://gitlab.gnome.org/GNOME/{{project}}/pipelines/new"
104 artifacts:
105 expire_in: 1 day
106 when: always
107 paths:
108 - build
109 reports:
110 junit: "build/meson-logs/testlog.junit.xml"
111
112 {% for distro in distributions %}
113 {% for version in distributions[distro] %}
114 .{{project}}.{{distro}}@common:
115 variables:
116 BASE_TAG: '${{"{"}}{{distro|upper}}_BASE_TAG}'
117 FDO_UPSTREAM_REPO: GNOME/{{project}}
118 FDO_DISTRIBUTION_PACKAGES: "{{" ".join(packages[distro].needed)}}"
119 FDO_DISTRIBUTION_EXEC: .gitlab-ci/setup-image-{{distro}}.sh
120
121 .{{project}}.{{distro}}:{{version}}@{{arch}}:
122 extends: .{{project}}.{{distro}}@common
123 variables:
124 FDO_DISTRIBUTION_VERSION: "{{version}}"
125 FDO_DISTRIBUTION_TAG: "{{arch}}-${BASE_TAG}"
126
127 build-container-{{distro}}:{{version}}@{{arch}}:
128 extends:
129 - .fdo.container-build@{{distro}}
130 - .{{project}}.{{distro}}:{{version}}@{{arch}}
131 stage: prepare
132 variables:
133 GIT_STRATEGY: none
134
135 build-{{distro}}:{{version}}@{{arch}}:
136 extends:
137 - .fdo.distribution-image@{{distro}}
138 - .{{project}}.{{distro}}:{{version}}@{{arch}}
139 needs:
140 - build-container-{{distro}}:{{version}}@{{arch}}
141 <<: *build
142
143 test-{{distro}}:{{version}}@{{arch}}:
144 tags:
145 - ipv6
146 extends:
147 - .fdo.distribution-image@{{distro}}
148 - .{{project}}.{{distro}}:{{version}}@{{arch}}
149 needs:
150 - build-{{distro}}:{{version}}@{{arch}}
151 <<: *test
152 {% endfor %}
153 {% endfor %}
154
155 {% if triggers is not none %}
156 {% for downstream in triggers %}
157 trigger-{{downstream}}:
158 stage: analysis
159 needs:
160 - test-{{targets["downstream"]}}
161 trigger: {{triggers[downstream]}}
162 only:
163 - master
164 {% endfor %}
165 {% endif %}
166
167 coverage-analysis:
168 extends:
169 - .fdo.distribution-image@{{targets["coverage"].split(":")[0]}}
170 - .{{project}}.{{targets["coverage"]}}
171 stage: analysis
172 allow_failure: true
173 script:
174 - cd build
175 - mkdir -p coveragereport
176 - gcovr --html-details --print-summary --root=.. --exclude=../build --exclude=../subprojects --exclude=../docs/reference --exclude=../tests --exclude=../tools --exclude=../examples --output coveragereport/index.html
177 coverage: '/^lines: (\d+\.\d+\%)/'
178 artifacts:
179 when: always
180 paths:
181 - build/coveragereport
182 needs:
183 - test-{{targets["coverage"]}}
184
185 static-scan:
186 extends:
187 - .fdo.distribution-image@{{targets["static-scan"].split(":")[0]}}
188 - .{{project}}.{{targets["static-scan"]}}
189 stage: analysis
190 needs:
191 - build-container-{{targets["static-scan"]}}
192 script:
193 - meson --buildtype=debug _scan_build -Dintrospection=false
194 - export SCANBUILD="$PWD/.gitlab-ci/scanbuild-wrapper.sh"
195 - ninja -C _scan_build scan-build
196 artifacts:
197 paths:
198 - _scan_build/meson-logs
199 after_script:
200 - .gitlab-ci/scanbuild-plist-to-junit.py _scan_build/meson-logs/scanbuild/ > _scan_build/junit-scan-build.xml
201 artifacts:
202 reports:
203 junit: "_scan_build/junit-scan-build.xml"
204
205 coverity:
206 extends:
207 - .fdo.distribution-image@{{targets["coverity"].split(":")[0]}}
208 - .{{project}}.{{targets["coverity"]}}
209 stage: analysis
210 allow_failure: true
211 script:
212 - curl https://scan.coverity.com/download/linux64 --data "token=$COVERITY_TOKEN&project={{project}}" --output /tmp/coverity_tool.tgz
213 - tar zxf /tmp/coverity_tool.tgz
214 - mkdir coverity-build
215 - cd coverity-build
216 - env CC=clang meson ..
217 - ../cov-analysis-linux64-*/bin/cov-build --dir cov-int ninja
218 - tar czf cov-int.tar.gz cov-int
219 - curl https://scan.coverity.com/builds?project={{project}}
220 --form token=$COVERITY_TOKEN --form [email protected]
221 --form [email protected] --form version="`git describe --tags`"
222 --form description="gitlab CI build"
223 needs:
224 - build-container-{{targets["coverity"]}}
225 only:
226 - master
227 except:
228 changes:
229 - po/*.po
230
231 pages:
232 extends:
233 - .fdo.distribution-image@{{targets["pages"].split(":")[0]}}
234 - .{{project}}.{{targets["pages"]}}
235 stage: website
236 script:
237 - mkdir -p public
238 - mv build/doc/{{project}}-{{api_version}} public/docs
239
240 artifacts:
241 paths:
242 - public
243 needs:
244 - build-{{targets["pages"]}}
245 rules:
246 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
247 - if: $CI_COMMIT_BRANCH == /^wip\/.*\/ci.*$/
248 - if: $CI_COMMIT_BRANCH == /^wip\/.*\/.*doc.*$/
249
250