ci.template revision 8db88b12
1{# You're looking at the template here, so you can ignore the below
2   warning. This is the right file to edit #}
3
4#####################################################
5#                                                   #
6#       THIS FILE IS GENERATED, DO NOT EDIT!        #
7#                                                   #
8# Generated with "ci-fairy generate-template", edit #
9# .gitlab-ci/ci.template and .gitlab-ci/config.yml  #
10# and rerun "ci-fairy generate-template" to change  #
11# this file.                                        #
12#                                                   #
13#####################################################
14
15.templates_sha: &template_sha 3d03cccd770c04e63b40325b42223495274d6a1d
16
17include:
18  - project: 'freedesktop/ci-templates'
19    ref: *template_sha
20    file:
21      - '/templates/ci-fairy.yml'
22    {% for d in distributions %}
23      - '/templates/{{d.name}}.yml'
24    {% endfor %}
25  - template: Security/SAST.gitlab-ci.yml
26
27stages:
28  - sanity check
29  - prep
30  - build
31  - test
32
33variables:
34  FDO_UPSTREAM_REPO: xorg/lib/libxcvt
35  MESON_BUILDDIR: "builddir"
36  NINJA_ARGS: ''
37  MESON_ARGS: ''
38  MESON_TEST_ARGS: ''
39  GIT_DEPTH: 1
40
41.policy:
42  retry:
43    max: 2
44    when:
45      - runner_system_failure
46      - stuck_or_timeout_failure
47  # cancel run when a newer version is pushed to the branch
48  interruptible: true
49
50
51# Re-generate the CI script and make sure it's the one currently checked in
52# If this job fails, re-generate the gitlab-ci.yml script, see
53# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
54#
55check-ci-script:
56  extends:
57    - .fdo.ci-fairy
58  stage: sanity check
59  script:
60    - ci-fairy generate-template --verify && exit 0 || true
61    - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
62    - exit 1
63
64#
65# Verify that commit messages are as expected, signed-off, etc.
66#
67check-commit:
68  extends:
69    - .fdo.ci-fairy
70  stage: sanity check
71  script:
72    - ci-fairy check-commits --signed-off-by --junit-xml=results.xml
73  except:
74    - master@xorg/lib/libxcvt
75  variables:
76    GIT_DEPTH: 100
77  artifacts:
78    reports:
79      junit: results.xml
80
81#
82# Verify that merge request has the "allow collaboration" checkbox ticked
83#
84check-merge-request:
85  extends:
86    - .fdo.ci-fairy
87  stage: sanity check
88  script:
89    - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
90  artifacts:
91    when: on_failure
92    reports:
93      junit: results.xml
94  allow_failure: true
95
96{% for d in distributions %}
97
98.{{d.name}}.{{d.version}}:
99  variables:
100    FDO_DISTRIBUTION_VERSION: '{{d.version}}'
101    FDO_DISTRIBUTION_TAG: '{{d.tag}}'
102
103prep-{{d.name}}-{{d.version}}:
104  extends:
105    - .fdo.container-build@{{d.name}}
106    - .{{d.name}}.{{d.version}}
107  stage: prep
108  variables:
109    FDO_DISTRIBUTION_PACKAGES: "{{' '.join(d.packages)}}"
110
111build-{{d.name}}-{{d.version}}:
112  extends:
113    - .fdo.distribution-image@{{d.name}}
114    - .{{d.name}}.{{d.version}}
115  stage: build
116  script:
117    - .gitlab-ci/meson-build.sh
118{% endfor %}
119