ci.template revision d9d3a8d2
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
26stages:
27  - sanity check
28  - prep
29  - build
30
31variables:
32  FDO_UPSTREAM_REPO: xorg/lib/libxcvt
33  MESON_BUILDDIR: "builddir"
34  NINJA_ARGS: ''
35  MESON_ARGS: ''
36  MESON_TEST_ARGS: ''
37  GIT_DEPTH: 1
38
39.policy:
40  retry:
41    max: 2
42    when:
43      - runner_system_failure
44      - stuck_or_timeout_failure
45  # cancel run when a newer version is pushed to the branch
46  interruptible: true
47
48
49# Re-generate the CI script and make sure it's the one currently checked in
50# If this job fails, re-generate the gitlab-ci.yml script, see
51# $SRCDIR/.gitlab-ci/generate-gitlab-ci.py
52#
53check-ci-script:
54  extends:
55    - .fdo.ci-fairy
56  stage: sanity check
57  script:
58    - ci-fairy generate-template --verify && exit 0 || true
59    - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify"
60    - exit 1
61
62#
63# Verify that commit messages are as expected, signed-off, etc.
64#
65check-commit:
66  extends:
67    - .fdo.ci-fairy
68  stage: sanity check
69  script:
70    - ci-fairy check-commits --signed-off-by --junit-xml=results.xml
71  except:
72    - master@xorg/lib/libxcvt
73  variables:
74    GIT_DEPTH: 100
75  artifacts:
76    reports:
77      junit: results.xml
78
79#
80# Verify that merge request has the "allow collaboration" checkbox ticked
81#
82check-merge-request:
83  extends:
84    - .fdo.ci-fairy
85  stage: sanity check
86  script:
87    - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
88  artifacts:
89    when: on_failure
90    reports:
91      junit: results.xml
92  allow_failure: true
93
94{% for d in distributions %}
95
96.{{d.name}}.{{d.version}}:
97  variables:
98    FDO_DISTRIBUTION_VERSION: '{{d.version}}'
99    FDO_DISTRIBUTION_TAG: '{{d.tag}}'
100
101prep-{{d.name}}-{{d.version}}:
102  extends:
103    - .fdo.container-build@{{d.name}}
104    - .{{d.name}}.{{d.version}}
105  stage: prep
106  variables:
107    FDO_DISTRIBUTION_PACKAGES: "{{' '.join(d.packages)}}"
108
109build-{{d.name}}-{{d.version}}:
110  extends:
111    - .fdo.distribution-image@{{d.name}}
112    - .{{d.name}}.{{d.version}}
113  stage: build
114  script:
115    - .gitlab-ci/meson-build.sh
116{% endfor %}
117