[tracker-miners/wip/carlosg/ci-updates: 1/3] ci: Update to using ci-fairy for building images




commit 201f4578b674fca400ef6fcde556974562e5bccc
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 4 15:26:15 2021 +0200

    ci: Update to using ci-fairy for building images
    
    And test alpine/fedora/ubuntu like in the Tracker repo.

 .gitlab-ci.yml | 217 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 205 insertions(+), 12 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1710944e4..41c797869 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,11 @@
-# The container images used in this pipeline are built from this
-# GitLab project: https://gitlab.gnome.org/GNOME/tracker-oci-images
+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:
+  MESON_TEST_TIMEOUT_MULTIPLIER: 3
   # These can be used to see verbose log output from the functional-tests.
   # See HACKING.md for more information.
   G_MESSAGES_DEBUG: ""
@@ -13,12 +17,113 @@ variables:
   TRACKER_TESTS_AWAIT_TIMEOUT: 60
 
 stages:
+  - prepare
+  - build
   - test
   - analysis
 
-.test_template: &test
-  stage: test
+.tracker-miners.fedora@common:
+  variables:
+    BASE_TAG: '2021-06-13.2'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_PACKAGES: 'clang clang-analyzer gcovr git libasan libubsan python3-gobject python3-pip 
umockdev-devel xmlto uncrustify patch diffutils'
+    FDO_DISTRIBUTION_EXEC: |
+      dnf install -y 'dnf-command(builddep)' &&
+      dnf builddep -y tracker tracker-miners --setopt=install_weak_deps=False &&
+      dnf clean all &&
+      pip3 install beautifulsoup4 mkdocs mkdocs-cinder tap.py meson
+
+.tracker-miners.ubuntu@common:
+  variables:
+    BASE_TAG: '2021-05-15.5'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_PACKAGES: 'python3-tap umockdev libumockdev-dev upower asciidoc-base git'
+    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 tracker tracker-miners
+
+.tracker-miners.alpine@common:
+  variables:
+    BASE_TAG: '2021-05-15.5'
+    FDO_UPSTREAM_REPO: GNOME/tracker
+    FDO_DISTRIBUTION_PACKAGES: 'alpine-sdk asciidoc bash-completion dbus dbus-dev git glib-dev 
gobject-introspection-dev gtk-doc icu-dev json-glib-dev libsoup-dev libxml2-dev meson py3-gobject3 
py3-setuptools py3-tappy sqlite-dev vala'
+
+.tracker-miners.fedora:34@x86_64:
+  extends: .tracker-miners.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: 34
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker-miners.fedora:rawhide@x86_64:
+  extends: .tracker-miners.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rawhide
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker-miners.fedora:34@aarch64:
+  extends: .tracker-miners.fedora@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: 34
+    FDO_DISTRIBUTION_TAG: "aarch64-${BASE_TAG}"
+  tags:
+    - aarch64
+
+.tracker-miners.ubuntu:rolling@x86_64:
+  extends: .tracker-miners.ubuntu@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: rolling
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
+
+.tracker-miners.alpine:edge@x86_64:
+  extends: .tracker-miners.alpine@common
+  variables:
+    FDO_DISTRIBUTION_VERSION: edge
+    FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
 
+build-fedora-container@x86_64:
+  extends:
+    - .fdo.container-build@fedora
+    - .tracker-miners.fedora:34@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-fedora-rawhide-container@x86_64:
+  extends:
+    - .fdo.container-build@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-fedora-container@aarch64:
+  extends:
+    - .fdo.container-build@fedora
+    - .tracker-miners.fedora:34@aarch64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-ubuntu-container@x86_64:
+  extends:
+    - .fdo.container-build@ubuntu
+    - .tracker-miners.ubuntu:rolling@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+build-alpine-container@x86_64:
+  extends:
+    - .fdo.container-build@alpine
+    - .tracker-miners.alpine:edge@x86_64
+  stage: prepare
+  variables:
+    GIT_STRATEGY: none
+
+.build-template: &build
+  stage: build
   script:
     # We can build and test tracker-miners against tracker just by building
     # tracker as a submodule.
@@ -28,6 +133,58 @@ stages:
     - cd build
     - meson .. --prefix=/usr -Dtracker_core=subproject -Db_lto=true -Db_coverage=true 
-Dtests_tap_protocol=true
     - ninja
+  artifacts:
+    expire_in: 1 day
+    paths:
+      - build
+
+build-fedora@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@x86_64
+  needs:
+    - build-fedora-container@x86_64
+  <<: *build
+
+build-fedora-rawhide@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
+  needs:
+    - build-fedora-rawhide-container@x86_64
+  <<: *build
+
+build-fedora@aarch64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@aarch64
+  needs:
+    - build-fedora-container@aarch64
+  allow_failure: true
+  <<: *build
+
+build-ubuntu-rolling@x86_64:
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .tracker-miners.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-container@x86_64
+  <<: *build
+
+build-alpine-edge@x86_64:
+  extends:
+    - .fdo.distribution-image@alpine
+    - .tracker-miners.alpine:edge@x86_64
+  needs:
+    - build-alpine-container@x86_64
+  <<: *build
+
+.test_template: &test
+  stage: test
+
+  script:
+    - cd build
+    - ninja
     - |
       # Remove the many "CI_" variables from the environment. Meson dumps the
       # whole environment for every failed test, and that gives a whole
@@ -51,27 +208,59 @@ stages:
       echo "These values can be set at https://gitlab.gnome.org/GNOME/tracker/pipelines/new";
 
   artifacts:
+    expire_in: 1 day
     when: always
     paths:
     - build/meson-logs/*.txt
     reports:
       junit: "build/meson-logs/testlog.junit.xml"
 
-test-fedora-latest:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
+test-fedora@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@x86_64
+  needs:
+    - build-fedora@x86_64
+  <<: *test
+
+test-fedora-rawhide@x86_64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
+  needs:
+    - build-fedora-rawhide@x86_64
+  <<: *test
+
+test-fedora@aarch64:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:34@aarch64
+  needs:
+    - build-fedora@aarch64
+  allow_failure: true
   <<: *test
 
-test-fedora-rawhide:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:rawhide
+test-ubuntu@x86_64:
+  extends:
+    - .fdo.distribution-image@ubuntu
+    - .tracker-miners.ubuntu:rolling@x86_64
+  needs:
+    - build-ubuntu-rolling@x86_64
   <<: *test
 
-test-ubuntu-rolling:
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/ubuntu:rolling
+test-alpine@x86_64:
+  extends:
+    - .fdo.distribution-image@alpine
+    - .tracker-miners.alpine:edge@x86_64
+  needs:
+    - build-alpine-edge@x86_64
   <<: *test
 
 coverage-analysis:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
   stage: analysis
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
   allow_failure: true
   script:
     - .gitlab-ci/checkout-tracker.sh
@@ -86,10 +275,14 @@ coverage-analysis:
     when: always
     paths:
     - coverage-build/coveragereport
+  needs:
+    - test-fedora@x86_64
 
 coverity:
+  extends:
+    - .fdo.distribution-image@fedora
+    - .tracker-miners.fedora:rawhide@x86_64
   stage: analysis
-  image: registry.gitlab.gnome.org/gnome/tracker-oci-images/amd64/fedora:latest
   allow_failure: true
   script:
     # Build tracker, we must go out the subproject route as we don't want


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