image: fedora:rawhide

variables:
  DEPENDENCIES_GRILO: gobject-introspection-devel libxml2-devel
                      libsoup-devel glib2-devel gtk3-devel
                      liboauth-devel totem-pl-parser-devel
                      meson redhat-rpm-config gcc gcc-c++ glibc-devel git vala
                      gtk-doc

  DEPENDENCIES: sqlite-devel libgcrypt-devel itstool lua-devel
                libsoup-devel gperf libarchive-devel json-glib-devel
                avahi-gobject-devel totem-pl-parser-devel rest-devel
                tracker-devel libdmapsharing-devel libmediaart-devel
                gom-devel gnome-online-accounts-devel libgdata-devel
                gstreamer1-plugins-good gstreamer1-plugins-bad-free-extras

build_stable:
  before_script:
    - dnf update -y --nogpgcheck
    - dnf install -y --nogpgcheck $DEPENDENCIES_GRILO
    # Build grilo from git, grilo and grilo-plugins must be in sync
    - git clone https://gitlab.gnome.org/GNOME/grilo.git
    - cd grilo
    - meson . _build --prefix=/usr
    - ninja -C _build
    - ninja -C _build install
    - cd ..
  script:
    - dnf install -y --nogpgcheck $DEPENDENCIES
    - meson . _build --prefix=/usr
    - ninja -C _build
    - ninja -C _build install
    - ninja -C _build test

image: fedora:rawhide

variables:
  DEPENDENCIES_GRILO: gobject-introspection-devel libxml2-devel
                      libsoup-devel glib2-devel gtk3-devel
                      liboauth-devel totem-pl-parser-devel
                      meson redhat-rpm-config gcc gcc-c++ glibc-devel git vala
                      gtk-doc

  DEPENDENCIES: sqlite-devel libgcrypt-devel itstool lua-devel
                libsoup-devel gperf libarchive-devel json-glib-devel
                avahi-gobject-devel totem-pl-parser-devel rest-devel
                tracker-devel libdmapsharing-devel libmediaart-devel
                gom-devel gnome-online-accounts-devel libgdata-devel
                gstreamer1-plugins-good gstreamer1-plugins-bad-free-extras

build_stable:
  before_script:
    - dnf update -y --nogpgcheck
  script:
    - dnf install -y --nogpgcheck $DEPENDENCIES_GRILO $DEPENDENCIES
    # As part of configuring grilo-plugins.git for build, the latest code from
    # grilo.git will be fetched by Meson and it will be built as a subproject.
    - meson . _build --prefix=/usr
    - ninja -C _build
    - ninja -C _build install
    - meson test -C _build --suite=grilo-plugins

Use subproject feature to build Grilo
ci: Use subproject feature to build Grilo

We can now rely on Meson to clone and build grilo.git as part
of the grilo-plugins build, so we can simplify the CI script.
