Update links to use gitlab instead of cgit & cvs
[xcbproto.git] / .gitlab-ci.yml
blob3b0ea3f5e8724e1cdc4c0685915135499b522ca5
1 # vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
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/
7 .templates_sha: &template_sha c5626190ec14b475271288dda7a7dae8dbe0cd76 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
10 include:
11   # Arch container builder template
12   - project: 'freedesktop/ci-templates'
13     ref: *template_sha
14     file: '/templates/arch.yml'
15   - project: 'freedesktop/ci-templates'
16     ref: *template_sha
17     file: '/templates/ci-fairy.yml'
18   - template: Security/SAST.gitlab-ci.yml
21 stages:
22   - prep             # prep work like rebuilding the container images if there is a change
23   - build            # for actually building and testing things in a container
24   - test
25   - deploy
28 variables:
29   FDO_UPSTREAM_REPO: 'xorg/proto/xcbproto'
30   # The tag should be updated each time the list of packages is updated.
31   # Changing a tag forces the associated image to be rebuilt.
32   # Note: the tag has no meaning, we use a date format purely for readability
33   FDO_DISTRIBUTION_TAG:  '2022-07-23.0'
34   # Packages needed to build xcbproto
35   XCBPROTO_PACKAGES:  'git gcc pkgconf autoconf automake make libxml2 python'
36   # Additional packages needed to build libxcb
37   LIBXCB_PACKAGES:  'libtool xorg-util-macros doxygen graphviz check libxslt libxau libxdmcp'
38   FDO_DISTRIBUTION_PACKAGES: $XCBPROTO_PACKAGES $LIBXCB_PACKAGES
41 # Verify that commit messages are as expected
43 check-commits:
44   extends:
45     - .fdo.ci-fairy
46   stage: prep
47   script:
48     - ci-fairy check-commits --junit-xml=results.xml
49   except:
50     - master@xorg/proto/xcbproto
51   variables:
52     GIT_DEPTH: 100
53   artifacts:
54     reports:
55       junit: results.xml
56   allow_failure: true
59 # Verify that the merge request has the allow-collaboration checkbox ticked
61 check-merge-request:
62   extends:
63     - .fdo.ci-fairy
64   stage: deploy
65   script:
66     - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
67   artifacts:
68     when: on_failure
69     reports:
70       junit: results.xml
71   allow_failure: true
75 # Build a container with the given tag and the packages pre-installed.
76 # This only happens if/when the tag changes, otherwise the existing image is
77 # re-used.
79 container-prep:
80   extends:
81     - .fdo.container-build@arch
82   stage: prep
83   variables:
84     GIT_STRATEGY: none
88 # The default build, runs on the image built above.
90 build:
91   stage: build
92   extends:
93     - .fdo.distribution-image@arch
94   script:
95     - export INSTDIR="$PWD/_inst"
96     - mkdir _builddir
97     - pushd _builddir > /dev/null
98     - ../autogen.sh --disable-silent-rules --prefix="$INSTDIR"
99     - make
100     - make check
101     - make install
102     - make distcheck
103     - popd > /dev/null
104   variables:
105   artifacts:
106     paths:
107       - _inst
110 # Build libxcb with the new xcbproto, runs on the image built above.
112 build-libxcb:
113   stage: test
114   extends:
115     - .fdo.distribution-image@arch
116   script:
117     - export INSTDIR="$PWD/_inst"
118     - export PKG_CONFIG_PATH=$(find $INSTDIR/ -name '*.pc' -printf "%h:")
119     - git clone --depth=1 https://gitlab.freedesktop.org/xorg/lib/libxcb
120     - pushd libxcb > /dev/null
121     - mkdir _builddir
122     - pushd _builddir > /dev/null
123     - ../autogen.sh --disable-silent-rules --enable-devel-docs --with-doxygen
124     - make
125     - make check
126     - make install
127     - make distcheck
128     - popd > /dev/null
129     - popd > /dev/null