include:
  - project: "GNOME/citemplates"
    file: "templates/default-rules.yml"
  - component: "gitlab.gnome.org/GNOME/citemplates/gnomeos-basic-ci@master"
    inputs:
      grcov-c: "disabled"
  - project: "Infrastructure/freedesktop-ci-templates"
    file: "templates/fedora.yml"
    ref: "3511e80d2edb5bbff1de2b224d44d05996528834"
  - component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
    inputs:
      dist-job-name: "build-gnomeos"

variables:
  FDO_UPSTREAM_REPO: GNOME/yelp-xsl

stages:
  - prepare
  - build
  - deploy

.fedora.container.common:
  variables:
    FDO_DISTRIBUTION_TAG: "2025-04-30.1"
    FDO_DISTRIBUTION_VERSION: "42"

build.container.fedora@x86_64:
  extends:
    - ".fdo.container-build@fedora"
    - ".fedora.container.common"
  stage: prepare
  variables:
    GIT_STRATEGY: none
    FDO_EXPIRES_AFTER: 8w
    FDO_DISTRIBUTION_PACKAGES: >-
      gettext
      git
      itstool
      libxml2
      libxslt
      meson

fedora-x86_64:
  extends:
    - ".fdo.distribution-image@fedora"
    - ".fedora.container.common"
  stage: build
  script:
    - meson setup _build/
    - meson compile -C _build/
    - meson test -C _build/
    - meson install -C _build/
    - meson dist --no-tests -C _build/
  artifacts:
    name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
    when: "always"
    paths:
      - "_build/meson-logs/"
