[libmediaart/wip/carlosg/ci-templates: 1/3] ci: Use FDO ci-templates




commit 3d460c71cf46064ae3a4726506a1286ab4c720a1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat May 22 14:45:04 2021 +0200

    ci: Use FDO ci-templates
    
    Create our own fedora/alpine/ubuntu images to test libmediaart.

 .gitlab-ci.yml | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 94 insertions(+), 7 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8c1b947..c781bf9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,9 @@
-# The container images used in this pipeline are built from this
-# GitLab project: https://gitlab.gnome.org/GNOME/tracker-oci-images
-#
-# This CI config is based on https://gitlab.gnome.org/GNOME/tracker/-/blob/master/.gitlab-ci.yml
+# This CI config uses FDO ci-templates: https://freedesktop.pages.freedesktop.org/ci-templates/
+include:
+  - remote: 
"https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/ci-fairy.yml";
+  - remote: 
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/alpine.yml'
+  - remote: 
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/fedora.yml'
+  - remote: 
'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/290b79e0e78eab67a83766f4e9691be554fc4afd/templates/ubuntu.yml'
 
 variables:
   G_MESSAGES_DEBUG: "libmediaart"
@@ -9,8 +11,81 @@ variables:
   MESON_TEST_EXTRA_ARGS: ""
 
 stages:
+  - prepare
   - test
 
+.libmediaart.fedora@common:
+  variables:
+    BASE_TAG: '2021-05-22.1'
+    FDO_UPSTREAM_REPO: GNOME/libmediaart
+    FDO_DISTRIBUTION_PACKAGES: 'git gdk-pixbuf2-devel gtk-doc meson'
+    FDO_DISTRIBUTION_EXEC: |
+      dnf install -y 'dnf-command(builddep)' &&
+      dnf builddep -y libmediaart --setopt=install_weak_deps=False &&
+      dnf clean all
+
+.libmediaart.ubuntu@common:
+  variables:
+    BASE_TAG: '2021-05-22.1'
+    FDO_UPSTREAM_REPO: GNOME/libmediaart
+    FDO_DISTRIBUTION_PACKAGES: 'git libgdk-pixbuf-2.0-dev gtk-doc meson'
+    FDO_DISTRIBUTION_EXEC: |
+      export DEBIAN_FRONTEND=noninteractive &&
+      sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list &&
+      apt-get -yq update && apt-get -yq upgrade &&
+      apt-get -yq build-dep libmediaart
+
+.libmediaart.alpine@common:
+  variables:
+    BASE_TAG: '2021-05-22.1'
+    FDO_UPSTREAM_REPO: GNOME/libmediaart
+    FDO_DISTRIBUTION_PACKAGES: 'alpine-sdk git glib-dev gtk-doc gdk-pixbuf-dev meson'
+
+.libmediaart.fedora:rawhide@x86_64:
+  extends: .libmediaart.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rawhide
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.libmediaart.ubuntu:rolling@x86_64:
+  extends: .libmediaart.ubuntu@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rolling
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.libmediaart.alpine:edge@x86_64:
+  extends: .libmediaart.alpine@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: edge
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+build-fedora-container@x86_64:
+  extends:
+    - .fdo.container-build@fedora
+    - .libmediaart.fedora:rawhide@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+  needs: []
+
+build-ubuntu-container@x86_64:
+  extends:
+    - .fdo.container-build@ubuntu
+    - .libmediaart.ubuntu:rolling@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+  needs: []
+
+build-alpine-container@x86_64:
+  extends:
+    - .fdo.container-build@alpine
+    - .libmediaart.alpine:edge@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+  needs: []
+
 .test_template: &test
   stage: test
 
@@ -43,13 +118,25 @@ stages:
     - build/meson-logs/testlog.txt
 
 test-alpine-edge:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/alpine:edge
+  extends:
+    - .fdo.distribution-image@alpine
+    - .libmediaart.alpine:edge@x86_64
+  needs:
+    - build-alpine-container@x86_64
   <<: *test
 
 test-fedora-latest:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+  extends:
+    - .fdo.distribution-image@fedora
+    - .libmediaart.fedora:rawhide@x86_64
+  needs:
+    - build-fedora-container@x86_64
   <<: *test
 
 test-ubuntu-rolling:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/ubuntu:rolling
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .libmediaart.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-container@x86_64
   <<: *test


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]