# This file defines the container images that at-spi2-core uses for its CI.
#
# Container images are built using the Freedesktop CI Templates infrastructure:
# https://gitlab.freedesktop.org/freedesktop/ci-templates/

# The SHAs here correspond to commits in the freedesktop/ci-templates repository.
# It doesn't change often, but you can update to newer SHAs if there are important
# changes there.
include:
  - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/3e66ea37e5672bb8f48e3056ba92915b5fc5b888/templates/opensuse.yml"
  - remote: "https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/3e66ea37e5672bb8f48e3056ba92915b5fc5b888/templates/fedora.yml"

variables:
  # When branching change the suffix to avoid conflicts with images
  # from the main branch
  BASE_TAG: "2023-01-18.0-main"
  RUST_STABLE: "1.64.0"

.container.opensuse@x86_64:
  stage: "container-build"
  variables:
    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
    FDO_DISTRIBUTION_VERSION: "tumbleweed"
    FDO_UPSTREAM_REPO: "gnome/at-spi2-core"
    FDO_DISTRIBUTION_PACKAGES: >-
      bzip2
      clang
      clang-tools
      dbus-1
      dbus-1-devel
      findutils
      gcc
      gettext
      git
      glib2-devel
      gobject-introspection-devel
      gsettings-desktop-schemas
      itstool
      libXi-devel
      libXtst-devel
      libasan6
      libxkbcommon-devel
      libxml2-devel
      llvm
      meson
      ninja
      python3-pip
      python310
      python310-gobject
      python310-pytest
      python310-python-dbusmock
      tar
      wget
      which
      xorg-x11-devel
      xvfb-run
    FDO_DISTRIBUTION_EXEC: >-
      bash ci/install-rust.sh ${RUST_STABLE} x86_64-unknown-linux-gnu &&
      pip3 install gi-docgen sphinx sphinx_rtd_theme

opensuse-container@x86_64:
  extends:
    - .fdo.container-build@opensuse@x86_64
    - .container.opensuse@x86_64
  stage: "container-build"

.container.fedora@x86_64:
  stage: "container-build"
  variables:
    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
    FDO_DISTRIBUTION_VERSION: "37"
    FDO_UPSTREAM_REPO: "gnome/at-spi2-core"
    FDO_DISTRIBUTION_PACKAGES: >-
      clang
      clang-tools-extra
      dbus-daemon
      dbus-devel
      dbus-tools
      findutils
      gcc
      gettext
      git
      glib2-devel
      gobject-introspection-devel
      gsettings-desktop-schemas
      itstool
      lcov
      libXi-devel
      libXtst-devel
      libasan
      libxkbcommon-devel
      libxml2-devel
      ninja-build
      procps
      python3
      python3-pip
      systemd-devel
    FDO_DISTRIBUTION_EXEC: >-
      pip3 install meson==0.63

fedora-container@x86_64:
  extends:
    - .fdo.container-build@fedora
    - .container.fedora@x86_64
  stage: "container-build"
