# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml: # # This CI uses the freedesktop.org ci-templates. # Please see the ci-templates documentation for details: # https://freedesktop.pages.freedesktop.org/ci-templates/ .templates_sha: &template_sha baa94a8f673dd1f11f81377106310752936d3672 # see https://docs.gitlab.com/ee/ci/yaml/#includefile include: # Arch container builder template - project: 'freedesktop/ci-templates' ref: *template_sha file: '/templates/arch.yml' - project: 'freedesktop/ci-templates' ref: *template_sha file: '/templates/ci-fairy.yml' - template: Security/SAST.gitlab-ci.yml stages: - prep # prep work like rebuilding the container images if there is a change - build # for actually building and testing things in a container - test - deploy variables: FDO_UPSTREAM_REPO: 'xorg/app/xpr' # The tag should be updated each time the list of packages is updated. # Changing a tag forces the associated image to be rebuilt. # Note: the tag has no meaning, we use a date format purely for readability FDO_DISTRIBUTION_TAG: '2026-07-19.0' # minimal set of packages required to build and install either way BASE_PACKAGES: 'git gcc clang pkgconf xorgproto libx11 libxmu' # packages needed to build and install with each set of tools AUTOTOOLS_PACKAGES: 'autoconf automake make xorg-util-macros' MESON_PACKAGES: 'meson ninja' # extra packages we need for comparing autotools & meson builds EXTRA_PACKAGES: 'diffoscope diffutils findutils jq' FDO_DISTRIBUTION_PACKAGES: $BASE_PACKAGES $AUTOTOOLS_PACKAGES $MESON_PACKAGES $EXTRA_PACKAGES # # Verify that commit messages are as expected # check-commits: extends: - .fdo.ci-fairy stage: prep script: - ci-fairy check-commits --junit-xml=results.xml except: - master@xorg/app/xpr variables: GIT_DEPTH: 100 artifacts: reports: junit: results.xml # # Build a container with the given tag and the packages pre-installed. # This only happens if when the tag changes, otherwise the existing image is # re-used. # container-prep: extends: - .fdo.container-build@arch stage: prep variables: GIT_STRATEGY: none # # The autotools build, runs on the image built above. # autotools: stage: build extends: - .fdo.distribution-image@arch script: - autoreconf -ivf - mkdir _builddir - pushd _builddir > /dev/null - ../configure --disable-silent-rules - make - make check - make distcheck - mv xpr-*.tar.gz .. - popd > /dev/null artifacts: paths: - xpr-*.tar.gz # # The meson build, runs on the image built above. # .meson_build: stage: build extends: - .fdo.distribution-image@arch script: - CC="${CC}" meson setup _builddir --prefix="$PWD/_install" - meson compile -C _builddir - meson install -C _builddir - meson test -C _builddir artifacts: when: always expire_in: 1 week paths: - _builddir/config.h - _builddir/meson-logs/meson-log.txt # Run meson build with different compilers meson: extends: - .meson_build parallel: matrix: - CC: ["gcc", "clang"] meson from tarball: extends: - .fdo.distribution-image@arch stage: test script: - mkdir -p _tarball_build - tar xf xpr-*.tar.gz -C _tarball_build - cd _tarball_build/xpr-* - meson setup _builddir - meson compile -C _builddir - meson test -C _builddir needs: - autotools compare meson and autotools: extends: - .fdo.distribution-image@arch stage: test script: - mkdir -p $PWD/_meson_inst $PWD/_autotools_inst $PWD/_autotools_build - CFLAGS="-O2" meson setup _meson_build --prefix=/usr --buildtype=plain - meson compile -C _meson_build -v - DESTDIR=$PWD/_meson_inst meson install -C _meson_build - cd _autotools_build - ../autogen.sh --prefix=/usr CFLAGS="-O2 -D_FILE_OFFSET_BITS=64" - make V=1 srcdir='..' && make install DESTDIR=${PWD%_build}_inst - cd .. # get rid of expected differences between the two - find $PWD/_meson_inst $PWD/_autotools_inst -exec touch -h -r $PWD/_meson_inst/ {} \+ - diffoscope --text-color=always _autotools_inst _meson_inst check versions are in sync: extends: - .fdo.distribution-image@arch stage: test script: - autoreconf -ivf - ./configure --version | head -n 1 | sed -e 's/xpr configure //' > autotools.version - meson introspect meson.build --projectinfo | jq -r '.version' > meson.version - diff -u autotools.version meson.version || (echo "ERROR - autotools and meson versions not in sync" && false)