Home | History | Annotate | Line # | Download | only in dist
      1 # vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml:
      2 #
      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/
      6 
      7 .templates_sha: &template_sha e195d80f35b45cc73668be3767b923fd76c70ed5 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
      8 
      9 
     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
     19 
     20 
     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
     26 
     27 
     28 variables:
     29   FDO_UPSTREAM_REPO: 'xorg/util/cf'
     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:  '2025-02-08.0'
     34   # minimal set of packages required to build and install either way
     35   BASE_PACKAGES:  'git pkgconf xorg-font-util'
     36   # packages needed to build and install with meson
     37   MESON_PACKAGES: 'meson ninja'
     38   FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $MESON_PACKAGES
     39 
     40 #
     41 # Verify that commit messages are as expected
     42 #
     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/util/cf
     51   variables:
     52     GIT_DEPTH: 100
     53   artifacts:
     54     reports:
     55       junit: results.xml
     56 
     57 #
     58 # Verify that the merge request has the allow-collaboration checkbox ticked
     59 #
     60 check-merge-request:
     61   extends:
     62     - .fdo.ci-fairy
     63   stage: deploy
     64   script:
     65     - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml
     66   artifacts:
     67     when: on_failure
     68     reports:
     69       junit: results.xml
     70   allow_failure: true
     71 
     72 
     73 #
     74 # Build a container with the given tag and the packages pre-installed.
     75 # This only happens if the tag changes, otherwise the existing image is
     76 # re-used.
     77 #
     78 container-prep:
     79   extends:
     80     - .fdo.container-build@arch
     81   stage: prep
     82   variables:
     83     GIT_STRATEGY: none
     84 
     85 
     86 #
     87 # The default build, runs on the image built above.
     88 #
     89 meson:
     90   extends:
     91     - .fdo.distribution-image@arch
     92   stage: build
     93   script:
     94     - mkdir -p ../_inst
     95     - meson setup builddir --prefix="$PWD/../_inst" $MESON_OPTIONS
     96     - meson compile -C builddir
     97     - meson install -C builddir
     98