Change LGPL-2.1+ to LGPL-2.1-or-later
[platform/upstream/glib.git] / .gitlab-ci.yml
1 stages:
2   - style-check
3   - build
4   - coverage
5   - analysis
6   - deploy
7   - report
8
9 cache:
10   paths:
11     - _ccache/
12
13 variables:
14   FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/glib/fedora:v20"
15   COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7"
16   DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v14"
17   MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v10"
18   MESON_TEST_TIMEOUT_MULTIPLIER: 4
19   G_MESSAGES_DEBUG: all
20   MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings"
21
22 # Default CI job setup; contrast with `.only-origin`.
23 #
24 # Don’t execute the pipeline when a merge request is merged into `main`, as it
25 # will have already been tested
26 .only-default:
27   only:
28     - branches
29   except:
30     refs:
31       - tags
32     variables:
33       - $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
34
35 # Some jobs run on CI runners which don’t have good isolation between CI jobs,
36 # and don’t have much available resource. Limit those jobs to only ones on the
37 # origin repository (GNOME/glib), rather than people’s forks. Code in the origin
38 # repository can be trusted.
39 .only-origin:
40   only:
41     - branches@GNOME/glib
42   except:
43     - tags
44
45 # Some jobs take a long time and are unlikely to find failures (or will find
46 # failures which are not merge-blockers to fix), so they’re executed on a weekly
47 # schedule in order to save CI resources and speed up branch pipelines.
48 .only-schedules:
49   only:
50     - schedules
51   except:
52     - tags
53
54 .build-linux:
55   before_script:
56     - bash .gitlab-ci/show-execution-environment.sh
57     - cp -r $HOME/subprojects/* subprojects/
58
59 # FIXME: Work around https://gitlab.com/gitlab-org/gitlab/-/issues/391756
60 .only-default-with-git:
61   extends: .only-default
62   before_script:
63    - rm -rf subprojects/gvdb
64    - git submodule update --init --depth 1
65   variables:
66     GIT_SUBMODULE_STRATEGY: "none"
67     GIT_SUBMODULE_DEPTH: 1
68
69 style-check-advisory:
70   extends: .only-default-with-git
71   image: $DEBIAN_IMAGE
72   stage: style-check
73   allow_failure: true
74   script:
75     - .gitlab-ci/run-style-check-diff.sh
76     - .gitlab-ci/run-check-todos.sh
77
78 sh-and-py-check:
79   extends: .only-default
80   image: $DEBIAN_IMAGE
81   stage: style-check
82   allow_failure: false
83   script:
84     - .gitlab-ci/run-shellcheck.sh
85     - .gitlab-ci/run-black.sh
86     - .gitlab-ci/run-flake8.sh
87   only:
88     changes:
89       - "**/*.py"
90       - "**/*.sh"
91
92 style-check-mandatory:
93   extends: .only-default-with-git
94   image: $DEBIAN_IMAGE
95   stage: style-check
96   allow_failure: false
97   script:
98     - .gitlab-ci/run-reuse.sh
99
100 fedora-x86_64:
101   extends:
102     - .build-linux
103     - .only-default
104   image: $FEDORA_IMAGE
105   stage: build
106   needs: []
107   variables:
108     CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
109   script:
110     - meson setup ${MESON_COMMON_OPTIONS}
111             --werror
112             --default-library=both
113             --prefix=$HOME/glib-installed
114             --localstatedir=/var
115             --libdir=lib
116             -Dsystemtap=true
117             -Ddtrace=true
118             -Dinstalled_tests=true
119             -Dgtk_doc=true
120             _build
121     - meson compile -C _build
122     - mkdir -p _coverage
123     - lcov --config-file .lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
124     - .gitlab-ci/run-tests.sh
125     - lcov --config-file .lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
126   artifacts:
127     reports:
128       junit:
129         - _build/meson-logs/testlog.junit.xml
130         - _build/meson-logs/testlog-*.junit.xml
131     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
132     when: always
133     expire_in: 1 week
134     paths:
135       - "_build/config.h"
136       - "_build/glib/glibconfig.h"
137       - "_build/meson-logs"
138       - "_build/docs/reference/glib/glib-undeclared.txt"
139       - "_build/docs/reference/glib/glib-undocumented.txt"
140       - "_build/docs/reference/glib/glib-unused.txt"
141       - "_build/docs/reference/gobject/gobject-undeclared.txt"
142       - "_build/docs/reference/gobject/gobject-undocumented.txt"
143       - "_build/docs/reference/gobject/gobject-unused.txt"
144       - "_build/docs/reference/gio/gio-undeclared.txt"
145       - "_build/docs/reference/gio/gio-undocumented.txt"
146       - "_build/docs/reference/gio/gio-unused.txt"
147       - "_coverage"
148
149 debian-stable-x86_64:
150   extends:
151     - .build-linux
152     - .only-default
153   image: $DEBIAN_IMAGE
154   stage: build
155   needs: []
156   script:
157     - meson setup ${MESON_COMMON_OPTIONS}
158             --werror
159             --default-library=both
160             --prefix=$HOME/glib-installed
161             --localstatedir=/var
162             --libdir=lib
163             -Dsystemtap=true
164             -Ddtrace=true
165             _build
166     - meson compile -C _build
167     - .gitlab-ci/run-tests.sh
168   artifacts:
169     reports:
170       junit:
171         - _build/meson-logs/testlog.junit.xml
172         - _build/meson-logs/testlog-*.junit.xml
173     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
174     when: always
175     expire_in: 1 week
176     paths:
177       - "_build/config.h"
178       - "_build/glib/glibconfig.h"
179       - "_build/meson-logs"
180
181 installed-tests:
182   extends:
183     - .build-linux
184     - .only-schedules
185   image: $FEDORA_IMAGE
186   stage: build
187   needs: []
188   script:
189     # dtrace is disabled because it breaks the static-link.py test
190     - meson setup ${MESON_COMMON_OPTIONS}
191             --werror
192             --prefix=/usr --libdir=/usr/lib64
193             -Dinstalled_tests=true
194             -Ddefault_library=both
195             -Ddtrace=false
196             _build
197     - meson compile -C _build
198     - sudo meson install -C _build
199     # Remove old headers, possibly present in current installation
200     - sudo rm -f /usr/include/glib-2.0/glib/gurifuncs.h
201     - sudo chown -R `id -un`:`id -gn` _build/
202     # Work-around https://gitlab.gnome.org/GNOME/gnome-desktop-testing/merge_requests/2
203     - mkdir -p _build/installed-tests-report/logs/
204     - GLIB_TEST_COMPILATION=1 gnome-desktop-testing-runner
205             --report-directory=_build/installed-tests-report/failed/
206             --log-directory=_build/installed-tests-report/logs/
207             --parallel=0
208             glib
209   artifacts:
210     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
211     when: always
212     expire_in: 1 week
213     paths:
214       - "_build/config.h"
215       - "_build/glib/glibconfig.h"
216       - "_build/meson-logs"
217       - "_build/installed-tests-report/"
218
219 G_DISABLE_ASSERT:
220   extends:
221     - .build-linux
222     - .only-schedules
223   image: $FEDORA_IMAGE
224   stage: build
225   needs: []
226   script:
227     - meson setup ${MESON_COMMON_OPTIONS}
228             --werror
229             -Dsystemtap=true
230             -Ddtrace=true
231             -Dinstalled_tests=true
232             -Dglib_assert=false
233             _build
234     - meson compile -C _build
235     - bash -x ./.gitlab-ci/run-tests.sh
236   artifacts:
237     reports:
238       junit:
239         - _build/meson-logs/testlog.junit.xml
240         - _build/meson-logs/testlog-*.junit.xml
241     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
242     when: always
243     expire_in: 1 week
244     paths:
245       - "_build/config.h"
246       - "_build/glib/glibconfig.h"
247       - "_build/meson-logs"
248
249 valgrind:
250   extends:
251     - .build-linux
252     - .only-schedules
253   image: $FEDORA_IMAGE
254   stage: analysis
255   needs: []
256   variables:
257     MESON_TEST_TIMEOUT_MULTIPLIER: 15
258   script:
259     - meson setup ${MESON_COMMON_OPTIONS}
260             --werror
261             -Dsystemtap=true
262             -Ddtrace=true
263             -Dinstalled_tests=true
264             _build
265     - meson compile -C _build
266     # Valgrind doesn’t work when the soft FD limit is set too high
267     # See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2710
268     - ulimit -Sn 1024
269     - bash -x ./.gitlab-ci/run-tests.sh
270                  --setup valgrind
271                  --no-suite slow
272   artifacts:
273     reports:
274       junit: "_build/meson-logs/testlog-valgrind.junit.xml"
275     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
276     when: always
277     expire_in: 1 week
278     paths:
279       - "_build/config.h"
280       - "_build/glib/glibconfig.h"
281       - "_build/meson-logs"
282
283 .cross-build-linux:
284   extends: .build-linux
285   stage: build
286   needs: []
287   artifacts:
288     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
289     when: always
290     expire_in: 1 week
291     paths:
292       - "_build/meson-logs"
293
294 cross-android_arm64:
295   extends:
296     - .cross-build-linux
297     - .only-default
298   image: $FEDORA_IMAGE
299   script:
300     # FIXME: add --werror
301     - meson setup ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build
302     - meson compile -C _build
303
304 cross-mingw64:
305   extends:
306     - .cross-build-linux
307     - .only-default
308   image: $MINGW_IMAGE
309   variables:
310     PYTHONUTF8: "1"
311   script:
312     # FIXME: Add --werror
313     - meson setup ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
314     - meson compile -C _build
315   artifacts:
316     reports:
317       junit:
318         - _build/meson-logs/testlog.junit.xml
319         - _build/meson-logs/testlog-*.junit.xml
320     name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
321     when: always
322     expire_in: 1 week
323     paths:
324       - _build/meson-logs
325       - _build/glib/libglib-2.0-0.dll
326       - _build/gio/libgio-2.0-0.dll
327       - _build/gmodule/libgmodule-2.0-0.dll
328       - _build/gthread/libgthread-2.0-0.dll
329       - _build/gobject/libgobject-2.0-0.dll
330
331 msys2-mingw32:
332   extends: .only-default
333   stage: build
334   tags:
335     - win32-ps
336   needs: []
337   variables:
338     MSYSTEM: "MINGW32"
339     CHERE_INVOKING: "yes"
340     CFLAGS: -coverage -ftest-coverage -fprofile-arcs
341     PYTHONUTF8: "1"
342     # FIXME: For some reason enabling jit debugging "fixes" random python crashes
343     # see https://github.com/msys2/MINGW-packages/issues/11864 and
344     # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3280#note_1678973
345     MSYS: "winjitdebug"
346   script:
347     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
348     - C:\msys64\usr\bin\bash .gitlab-ci/show-execution-environment.sh
349     - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
350   artifacts:
351     reports:
352       junit:
353         - _build/meson-logs/testlog.junit.xml
354         - _build/meson-logs/testlog-*.junit.xml
355     name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
356     when: always
357     expire_in: 1 week
358     paths:
359       - _build/meson-logs
360       - _coverage/
361
362 msys2-clang64:
363   extends: .only-schedules
364   stage: build
365   tags:
366     - win32-ps
367   needs: []
368   variables:
369     MSYSTEM: "CLANG64"
370     CHERE_INVOKING: "yes"
371     PYTHONUTF8: "1"
372     # FIXME: For some reason enabling jit debugging "fixes" random python crashes
373     # see https://github.com/msys2/MINGW-packages/issues/11864 and
374     # https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3280#note_1678973
375     MSYS: "winjitdebug"
376   script:
377     - C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
378     - C:\msys64\usr\bin\bash .gitlab-ci/show-execution-environment.sh
379     - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
380   artifacts:
381     reports:
382       junit: "_build/meson-logs/testlog.junit.xml"
383     name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
384     when: always
385     expire_in: 1 week
386     paths:
387       - _build/meson-logs
388
389 vs2017-x64:
390   extends: .only-default
391   stage: build
392   tags:
393     - win32-ps
394   needs: []
395   variables:
396     PYTHONUTF8: "1"
397   script:
398     # FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
399     # aren’t currently set up for that.
400     - .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS}
401                                --wrap-mode=default
402                                --python.platlibdir=C:\Python37\site-packages
403                                --python.purelibdir=C:\Python37\site-packages
404   artifacts:
405     reports:
406       junit:
407         - _build/meson-logs/testlog.junit.xml
408         - _build/meson-logs/testlog-*.junit.xml
409     name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
410     when: always
411     expire_in: 1 week
412     paths:
413       - _build/meson-logs
414       - _build/glib/libglib-2.0-0.dll
415       - _build/gio/libgio-2.0-0.dll
416       - _build/gmodule/libgmodule-2.0-0.dll
417       - _build/gthread/libgthread-2.0-0.dll
418       - _build/gobject/libgobject-2.0-0.dll
419
420 vs2017-x64-static:
421   extends: .only-default
422   stage: build
423   tags:
424     - win32-ps
425   needs: []
426   variables:
427     PYTHONUTF8: "1"
428   script:
429     # FIXME: These should use --wrap-mode=nodownload but the Windows CI machines
430     # aren’t currently set up for that.
431     - .gitlab-ci/test-msvc.bat ${MESON_COMMON_OPTIONS}
432                                --wrap-mode=default
433                                --default-library=static
434                                --python.platlibdir=C:\Python37\site-packages
435                                --python.purelibdir=C:\Python37\site-packages
436   artifacts:
437     reports:
438       junit:
439         - _build/meson-logs/testlog.junit.xml
440         - _build/meson-logs/testlog-*.junit.xml
441     name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}"
442     when: always
443     expire_in: 1 week
444     paths:
445       - _build/meson-logs
446
447 freebsd-12-x86_64:
448   # The FreeBSD 13 build is run on each commit, so the FreeBSD 12 build can be
449   # run less regularly to save CI resources. The chance of a regression on
450   # FreeBSD 12 and not FreeBSD 13 is tiny.
451   extends: .only-schedules
452   stage: build
453   tags:
454     # To run a FreeBSD builder, install gitlab-runner package and start both
455     # gitlab-runner and dbus service because we need /var/lib/dbus/machine-id.
456     # To compile GLib, you still have to install the following packages:
457     # desktop-file-utils gettext libiconv meson pkgconf python3 shared-mime-info
458     - freebsd-12
459   needs: []
460   variables:
461     # CPPFLAGS is required because libintl doesn't use pkg-config.
462     CPPFLAGS: -I/usr/local/include
463     # FIXME: Workaround meson inability to set LD_LIBRARY_PATH.
464     # https://github.com/mesonbuild/meson/issues/1383
465     # https://github.com/mesonbuild/meson/issues/1635
466     # https://github.com/mesonbuild/meson/issues/2881
467     LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
468     # FreeBSD supports C.UTF-8 locale since 12.1.
469     LANG: C.UTF-8
470   before_script:
471     - bash .gitlab-ci/show-execution-environment.sh
472   script:
473     # We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
474     # FreeBSD supports xattr, but its API is different from Linux xattr.
475     # FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
476     # localstatedir is needed for access to /var/lib/dbus/machine-id
477     - meson setup ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
478     - meson compile -C _build
479     - bash -x ./.gitlab-ci/run-tests.sh
480   artifacts:
481     reports:
482       junit:
483         - _build/meson-logs/testlog.junit.xml
484         - _build/meson-logs/testlog-*.junit.xml
485     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
486     when: always
487     expire_in: 1 week
488     paths:
489       - "_build/config.h"
490       - "_build/glib/glibconfig.h"
491       - "_build/meson-logs"
492
493 freebsd-13-x86_64:
494   extends: .only-origin
495   stage: build
496   tags:
497     - freebsd-13
498   needs: []
499   variables:
500     CPPFLAGS: -I/usr/local/include
501     LDFLAGS: -L/usr/local/lib -Wl,--disable-new-dtags
502     LANG: C.UTF-8
503   before_script:
504     - bash .gitlab-ci/show-execution-environment.sh
505   script:
506     - meson setup ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
507     - meson compile -C _build
508     - bash -x ./.gitlab-ci/run-tests.sh
509   artifacts:
510     reports:
511       junit:
512         - _build/meson-logs/testlog.junit.xml
513         - _build/meson-logs/testlog-*.junit.xml
514     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
515     when: always
516     expire_in: 1 week
517     paths:
518       - "_build/config.h"
519       - "_build/glib/glibconfig.h"
520       - "_build/meson-logs"
521
522 macos-x86_64:
523   extends: .only-origin
524   stage: build
525   tags:
526     - macosintel
527   needs: []
528   cache: []
529   variables:
530     GIT_SUBMODULE_STRATEGY: normal
531     # -Wno-overlength-strings
532     # libpcre2 gets built as a subproject, but the default Clang options on
533     # macOS limit string lengths to 4095B — pcre2_error.c has a string of length
534     # 4380B
535     CFLAGS: "-Wno-overlength-strings"
536     # redirect to the runner's volatile temporary directory
537     TMPDIR: /Users/Shared/work/tmp
538     # keep the user profile clean
539     PIP_CACHE_DIR: /Users/Shared/build/cache
540     PIPENV_CACHE_DIR: $PIP_CACHE_DIR
541     PYTHONPYCACHEPREFIX: $PIP_CACHE_DIR
542     # target OS X 10.9 Mavericks for backward compatibility
543     SDKROOT: /opt/sdks/MacOSX10.9.sdk
544     # use the runner's ccache directory
545     CCACHE_DIR: /Users/Shared/work/ccache
546   before_script:
547     - bash .gitlab-ci/show-execution-environment.sh
548     - python3 -m venv .venv
549     - ln -s /opt/cmake/CMake.app/Contents/bin/cmake .venv/bin
550     - ln -s /opt/ccache/ccache .venv/bin
551     - source .venv/bin/activate
552     - pip3 install meson==1.2.0
553     - pip3 install ninja==1.11.1
554   script:
555     # FIXME: Use --wrap-mode=default so we download dependencies each time,
556     # until the macOS runner is a VM where we can use a pre-made image which
557     # already contains the dependencies. See:
558     #  - https://gitlab.gnome.org/GNOME/glib/merge_requests/388
559     #  - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225
560     - meson setup ${MESON_COMMON_OPTIONS}
561             --wrap-mode=default
562             --werror
563             _build
564     - meson compile -C _build
565     - .gitlab-ci/run-tests.sh
566   artifacts:
567     reports:
568       junit:
569         - _build/meson-logs/testlog.junit.xml
570         - _build/meson-logs/testlog-*.junit.xml
571     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
572     when: always
573     expire_in: 1 week
574     paths:
575       - "_build/config.h"
576       - "_build/glib/glibconfig.h"
577       - "_build/meson-logs"
578
579 coverage:
580   extends: .only-default
581   image: $FEDORA_IMAGE
582   stage: coverage
583   needs: ['fedora-x86_64', 'msys2-mingw32']
584   artifacts:
585     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
586     expire_in: 1 week
587     expose_as: 'Coverage Report'
588     paths:
589       - _coverage/coverage/index.html
590       - _coverage
591     reports:
592       coverage_report:
593         coverage_format: cobertura
594         path: _coverage/*-cobertura/cobertura-*.xml
595   before_script:
596     - bash .gitlab-ci/show-execution-environment.sh
597   script:
598     - bash -x ./.gitlab-ci/coverage-docker.sh
599   coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
600
601 scan-build:
602   extends:
603     - .build-linux
604     - .only-schedules
605   image: $FEDORA_IMAGE
606   stage: analysis
607   needs: []
608   script:
609     - meson setup ${MESON_COMMON_OPTIONS}
610             --werror
611             --default-library=both
612             --prefix=$HOME/glib-installed
613             --localstatedir=/var
614             --libdir=lib
615             -Dsystemtap=true
616             -Ddtrace=true
617             -Dinstalled_tests=true
618             _scan_build
619     - ninja -C _scan_build scan-build
620   artifacts:
621     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
622     when: always
623     expire_in: 1 week
624     paths:
625       - "_scan_build/meson-logs/scanbuild"
626
627 .coverity:
628   extends:
629     - .build-linux
630     - .only-schedules
631   image: $COVERITY_IMAGE
632   stage: analysis
633   needs: []
634   variables:
635     # cov-build doesn’t like GLIB_DEPRECATED_ENUMERATOR
636     CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
637   script:
638     - meson setup ${MESON_COMMON_OPTIONS}
639             --werror
640             --default-library=both
641             --prefix=$HOME/glib-installed
642             --localstatedir=/var
643             --libdir=lib
644             -Dsystemtap=true
645             -Ddtrace=true
646             -Dinstalled_tests=true
647             _coverity_build
648     - $HOME/cov-analysis-linux64-*/bin/cov-build --dir cov-int meson compile -C _coverity_build
649     - tar cfz cov-int.tar.gz cov-int
650     - curl https://scan.coverity.com/builds?project=$COVERITY_SCAN_PROJECT_NAME
651            --form token=$COVERITY_SCAN_TOKEN --form email=$GITLAB_USER_EMAIL
652            --form file=@cov-int.tar.gz --form version="$CI_COMMIT_SHA"
653            --form description="$CI_COMMIT_SHA / $CI_COMMIT_TITLE / $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID"
654   artifacts:
655     name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
656     when: always
657     expire_in: 1 week
658     paths:
659       - "cov-int/build-log.txt"
660
661 pages:
662   extends: .only-schedules
663   stage: deploy
664   needs: ['coverage', 'style-check-advisory']
665   script:
666     - mv _coverage/ public/
667   artifacts:
668     paths:
669       - public
670
671 dist-job:
672   image: $FEDORA_IMAGE
673   stage: build
674   only:
675     - tags
676   script:
677     # Ignore extra git security checks as we don't care in CI.
678     - git config --global --add safe.directory "${PWD}"
679     - git submodule update --init
680     - for m in $(git submodule foreach -q 'echo $path'); do git config --global --add safe.directory "${PWD}/${m}"; done
681     - meson subprojects download
682     - meson setup ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build
683     - meson dist -C _build
684     - ninja -C _build glib-doc gobject-doc gio-doc
685     - tar -c -J -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
686     - tar -c -J -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
687     - tar -c -J -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
688   artifacts:
689     paths:
690       - "${CI_PROJECT_DIR}/_build/glib-docs-$CI_COMMIT_TAG.tar.xz"
691       - "${CI_PROJECT_DIR}/_build/gobject-docs-$CI_COMMIT_TAG.tar.xz"
692       - "${CI_PROJECT_DIR}/_build/gio-docs-$CI_COMMIT_TAG.tar.xz"
693       - "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"
694
695 issue-bot:
696   stage: report
697   image: registry.gitlab.com/gitlab-org/distribution/issue-bot:latest
698   script: /issue-bot
699   rules:
700     - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
701       when: on_failure