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 185ede0e9b9b1924b92306ab8b882a6294e92613 # see https://docs.gitlab.com/ee/ci/yaml/#includefile 8 9 10include: 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 21stages: 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 28variables: 29 FDO_UPSTREAM_REPO: 'xorg/lib/libpciaccess' 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: '2023-10-17.1' 34 FDO_DISTRIBUTION_PACKAGES: 'git meson ninja gcc pkgconf zlib' 35 36# 37# Verify that commit messages are as expected, signed-off, etc. 38# 39check-commits: 40 extends: 41 - .fdo.ci-fairy 42 stage: prep 43 script: 44 - ci-fairy check-commits --junit-xml=results.xml 45 except: 46 - master@xorg/lib/libpciaccess 47 variables: 48 GIT_DEPTH: 100 49 artifacts: 50 reports: 51 junit: results.xml 52 53# 54# Verify that the merge request has the allow-collaboration checkbox ticked 55# 56check-merge-request: 57 extends: 58 - .fdo.ci-fairy 59 stage: deploy 60 script: 61 - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml 62 artifacts: 63 when: on_failure 64 reports: 65 junit: results.xml 66 allow_failure: true 67 68 69# 70# Build a container with the given tag and the packages pre-installed. 71# This only happens if/when the tag changes, otherwise the existing image is 72# re-used. 73# 74container-prep: 75 extends: 76 - .fdo.container-build@arch 77 stage: prep 78 variables: 79 GIT_STRATEGY: none 80 81# 82# Builds run on the image built above. 83# 84 85meson: 86 extends: 87 - .fdo.distribution-image@arch 88 stage: build 89 parallel: 90 matrix: 91 - MESON_OPTIONS: ['-Dzlib=disabled', '-Dzlib=enabled'] 92 script: 93 - mkdir -p ../_inst 94 - meson setup builddir --prefix="$PWD/../_inst" -Dwarning_level=3 -Ddefault_library=both $MESON_OPTIONS 95 - meson configure builddir 96 - ninja -C builddir test 97 - ninja -C builddir install 98